Default Aggregation on Tableau Calculated Field that uses Count - tableau-desktop

If I create a calculated field in Tableau like COUNTD([Account ID])/10, I cannot set a default aggregation on that field. However, if it is just something like SUM([# of Accounts])/10 then it will allow it. So my question is how can I set up the calculated field so that I can do a default aggregation when the calculation includes COUNTD?

Related

{FIXED} calculated field ignoring filter

I'd like to create 2 calculated fields which are summarizing data. I want them to ignore date filter. I tried like 20 different things and accomplished nothing.
My goal
Tableau workbook

Is it possible to apply a filter to a specific sheet based on a parameter?

I have 6+ sheets on my dashboard and I want to be able to filter/search a value, but only apply it to the sheet I selected.
Further explanation:
I have a parameter list w/ the following values: Sheet1, Sheet2, Sheet3
Based on this parameter, I have a calculated field that outputs the values from Sheet1 if Sheet1 was selected, and so on.
If parameter is Sheet1, then I want to filter/search only in Sheet1. If it's Sheet2, I want to filter/search on Sheet2 only.
Is this possible on Tableau Desktop?
I'm not able to provide a workbook, apologies in advance.
Hello datascientistwannabe,
Don't worry about the workbook, its not needed and besides, if you were to share something, always best to use Superstore.
Yes, the great thing about Tableau is that you can be really specific about how interactions affect different vizzes. You have the choice of defining filtering from the actions menu by decided which sheets shall be targeted, and for greater granularity, you can even determine which fields are affected rather than all fields.
Also, you could tie calculations to parameters so as a parameter is updated, so too is the calculation, and then you can simply use the calculation.
Or, if you really want control, how about using different data sets for your visuals, controlling them by parameter, and then using Set Parameter actions, to populate parameters using data from a different source.
Steve

How to refer to calculated field from another calculated field in google sheets pivote?

I have a pivote table with two calculated fields. Is there any solution to refer this fields when i creating new calculated field ?
For example i have:
CalculatedField1
=SUM(arrayformula('sourceCol1'))
CalculatedField2
=AVERAGE(arrayformula('sourceCol2'))
Is there any way to multiply them like this?
='CalculatedField1'*'CalculatedField2'

Aggregating a calculated field in TClientDataset

Is it possible to add an aggregate field over a calculated field?
Suppose there is a cds with following fields:
ID(autoincrement)
Name(string)
Price(float)
Quantity(integer)
Total(integer) - calculated field - Price * Quantity
and I want to add an agregate to get the sum of Total column. Is it possible?
Yes, that is possible if you change the calculated field to an InternalCalc field. The calculation is still done in the OnCalcFields event, but you have to check the state for InternalCalc when you make the calculation for that field.

DELPHI: Put calculated value into a master detail where details are in a grid

I have created a master-detail relation using ClientDataSets (Service & Addons). The Services are displayed in a DBLookupComboBox (cboServices) and once a service is selected the Addons are displayed in DBGrid (grdMain).
The Addons has a checkbox to indicate the Addon is selected, a name field, a quantities field that the user can change, a unit price field and a total price field.
I have created a OnQuantityChange method to update the total price using the unit price and quantity but how do I get the actual data from the row to do the updating? How do I reference the various fields in order to do something like the following:
grdMain.GetActiveRow.Column['TotalPrice'] :=
grdMain.GetActiveRow.Column['UnitPrice'] * grdMain.GetActiveRow.Column['Quantity'];
You can do that easily using calculated fields. I suggest you look at the following article for a detailed example with client dataset. Just search the article for calculated fields, you will find what you need.
TClientDataset example

Resources