Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a pivot table in Qlik Sense with several expandable dimensions. Each dimension has the totals column calcualtion activated.
I want the total label to state one thing for a dimension (e.g. a formula that results in "totals january-december" based on months in current selections), but I want the totals label to be something different (e.g. simply "Total") if the dimension is an expanded dimension, i.e. not the first dimension in the chart.
I could probably achieve this with GetObjectDimension() if the dimension was a row expansion, but in my case I am expanding columns and I cant be sure how many row dimensions there are in the current layout of the pivot table (as I have asked about in a related but separate question).
Example when my "month" dimension is the first dimension:
Totals (jan-feb) | january | february | march | april | |
value | 600 | 200 | 150 | 200 | 50 |
If month is not the first dimension (in this case "quarter" is first), I want to change the totals label like this:
Q1 | Q1 | Q1 | Q1 | Q2 | Q2 | |
Total Q1 | january | february | march | Total Q2 | april | |
550 | 200 | 150 | 200 | 50 | 50 |
Is it possible?
Try this
if(GetCurrentFieldIndex() = 0, 'Totals (january-december)', 'Total')
Hi Try using GetFieldSelections(),
in label as 'Totals ('&GetFieldSelections([month])&')'
In pivot you may need to move the dimension top to enable the Totals you can apply the same for all the dimensions as is.
@Chanty4u GetCurrentFIeldIndex() doesn't exist. GetCurrentField() is a QlikView function that gets the current dimension of a cyclic group and that is not my issue (also, I'm on Qlik Sense).
@Chintam GetFieldSelections() retrieves selected values, but that does not relate to my question at all. My issue is that I want to determine if the dimension is the top column dimension or if it isn't, regardless of any selections.