Change the display name of a calculation in Tableau - tableau-api

How can the display nam of a computed field be customized? Note the entire calculation is being displayed as the field label in the tooltip :
When attempting to customize that calculated field there is no apparent way to change the display name:
Update Here is the set of dimensions and measures: notice the last dimension on the rows is the calculated field. That is what I am unable to discover how to name/alias/..

Right click the calculation and select Edit in Shelf. Move your cursor to the first character and press Shift+Enter to add a new line above your calculation. On this blank line, add the alias in the form of a comment, e.g. //AverageScore.
Note that making changes to the field can sometimes undo this and it will need to be reapplied.

You need to create it as a calculated field. It could be that it is a calculation in the "Shelf" in the way you have displayed it. You would need to go to your list of fields displayed on the left, right click and click "Create", and then copy your formula into that, and be sure to name it what you want and then save it. Then it will show up as a field in the list of fields on the left.

Related

Suppress a field and its placeholder in Crystal Reports

I am working in Crystal Reports to generate a report, and I would like to add a note/remark for some records, so the record should be double-lined for these specific records and a single-line for others
the issue is that the row should be in its standard height unless a specific field has a certain value. In that case, the row should be expanded and field with red-colored note is placed in the expansion.
I tried suppressing the fields but it does not remove the placeholder
The attached is what I am aiming to do, the Zurich Record has a note in red color, announcing the trip is for ladies only.
I will be gratefull for anyone can give me a hand
There are multiple ways to accomplish the same.
Create a name field formula and append the "conditional text" based on logic
if condition then
text:=text + "*dummy text"; // this is just an example
//add conditional color logic for appended text
Create another detail section just below the existing detail, and add conditional show hide logic to suppress.
You have to check the alignment of fields in the previous detail section for "Can Grow" option- like you want "dummy text" to be aligned in height with other column data?. Because with this option, your text field will always appear to be below your row.
You can add another field and place it below Name, and add formula on its height to be suppressed, based on condition. (Again this will mess up if your name field grows into multiple lines, by overlapping this field in the process).
This could be done with a second DetailSection.
Create a new DetailSection below the existing one.
Put the note/remark in the new DetailSection
Edit the suppression-formula of the new DetailSection and insert the suppression-formula that's currently used on the note/remark-field

Tableau Desktop Filter Disable/Enable

Working on Tableau desktop[Making a visualization] have two filters one cascaded to another.Need a help when making multiple selections in one filter should disable another filter. If one selection is made in a filter then other filter should be enabled and shown.
Looking for answers
Tableau graph
You could solve this in a dashboard using the sheet/object swapping and popping technique as explained here. Basically how it works is having a dummy sheet which is empty on a certain condition but which will have values if not. The parameter will be placed below this sheet which results in it moving downwards/upwards whenever the condition changes. Together with a motionless opaque text field it becomes possible to hide the filter. I tested the solution underneath.
You will need a calculated field hide_names which results in True if the condition is filled. In your case:
if COUNTD([Manager]) > 1 then False else True end
Next create a dummy worksheet which you will fill with another calculated field which does almost nothing e.g. 'a'. This sheet will be used to 'pop out' the filter in your dashboard. To have this functionality you need to drag the newly created hide_names into filters and filter on the custom value False.
Now let's look at the dashboard.
First bring in the original sheet together with the relevant filters.
Right click the manager filter and select "all using this data source". This way your dummy sheet will also be aware of changes in the filter.
Then create a horizontal floating object in which you need to drag the names filter. On top of the names you need to drag the dummy sheet so if the sheet is active it will push down the second filter.
What you should have now is once you select more than one manager a sheet containing 'a' is shown and the second filter is pushed down. This is not ideal. You will need one or two more things depending on the actual lay-out of your dashboard.
You can make your dummy sheet entirely white by changing the format so all rows/columns/text display white, disabling the tooltip and removing headers and titles.
Create a new empty floating text object. Right click on it and select format text object. Select white shading for this object. This way it becomes opaque. Drag and change dimensions of this object so it hides the second filter whenever the dummy sheet is shown.
Once you have all of these elements you can sort of play with it to make it work. You can find a demo of a dashboard with similar but not exactly the same functionality here.

SSRS cannot linked text box with field

I group my table by 3 attributes, and set page break on every group, and now i want to display that three attribute outside the table. I want to place them on the top of the report, and when i type the expression and i go in run view it's display only the first value, when i go to the next page nothing change
I tried to drag field from table, from data set, and nothing working.
In expression i type
=Fields!My_Field.Value.
Also if some of that three attributes i placed in table it normally displays values, but when i try to move it somewhere it stops displaying.
The issue is that a table is associated with a dataset but a text box is not.
You can reference a field from a text box using the Dataset field ( =Sum(Fields!AMOUNT.Value, "Dataset1") ) but you need to use an aggregate function like First, Last, or SUM.
It sounds like you don't want to use an aggregate since you are grouping by these fields, though.
display the three attribute outside the table
If your trying to display the current grouping in the table at the top of each page, add a new Row in your matrix above your header row and add your group fields there.

MS Access Report Formatting - Grouping

I've been unsuccessful in determining how to make the "Category" column only display the value once per grouping, as it is grouped on its self.
Here is what I have:
I would like to make it so that "Beverage" and other following grouped categories only display once. It also needs to be in-line with the first description item.
Thanks!
Ok!,
I figured it out. In order to do so, you need to go to the text box's properties and in format set "Yes" to "Hide Duplicates".
here is an image:
Hide Duplicates is the 6th to last item on the format tab of the control properties window.
Cheers!

How to populate the value of a Text Box based on the value in a Combo Box in MS Access 2007?

I have a combo box which is of a lookup type, i.e., I've selected the source to be a column from a table and am storing the selected value in another table. The table which I am looking up has another column and I need the value in this column to be displayed in a text box and each time I change the value in the combo box, I need the corresponding value to be displayed in the text box. How can I do this? What I have done so far is to write a Select query that selects the appropriate column based on the combo box's value. Is there a more decent way of doing this? Please help me!
Make the source of the combo box to your 2 fields e.g. SELECT id, name FROM Customers
Make sure you set the Column Count property of the combo to 2, accordingly.
Then make you unbound text box source equal to =MyCombo.Column(1) (from memory, this Column is zero based).
That's it, zero code required.
It's nicer to use an event of the combo box e.g. onChange, so when a selection is made the event sets the value of the text box.
me!txtTextBox1 = me!cboComboBox1.column(1)
That way it will work everytime.
You could also use a button with onClick etc. but the choice is yours (and as mentioned in the previous post, alter the column number based on its row source with 0 being the first.
After reading the question and answers I tried the following, and it seems to work well (so far):
In order to display more than one column of a combobox selection, I have resorted to the following:
Place a textbox over the combobox,
Size it by sampling other fields, so that it covers the text frame of the combobox.
I have purposely have left a small space to the right of the NEW textbox to indicate that it
Is NOT part of the combobox.
In the Control Source for the textbox enter the expression below:
=[DefaultAcct].[Column](1) & " " & [DefaultAcct].[Column](2)
Then, in the ‘onchange’ event of the combobox, set focus to the textbox.
Private Sub DefaultAcct_Change()
txtConcatenate1.SetFocus
End Sub