Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation condition, where table only calculates expressions when a specific filter is applied?

Hi,

I have a database of historic month end data for trend analyses, but I also have a field for "Latest Data Flag", which only selects the latest data upload when I want to analyse only the most recent data submitted.

What I want to do is have a PivotTable only perform its calculations when the [Latest Data Flag] ='Y' (the entries for this field can only be either 'Y' or blank), or be permanently set to show only the latest data.

I have tried entering [Latest Data Flag] = 'Y' as my calculation condition, but when I test it by selecting a [Year] and/or [Month], the table still sums all the historic data in the selection.

I have also tried to include [Latest Data Flag]='Y' as a dimension (so it permanently shows only latest data), but I do not want this additional column to appear in my Pivot Table.

Any suggestions about how I can do this?

Thanks

AJ

2 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

You can use [Latest Data Flag] in expression........... Sum(If([Latest Data Flag]='Y',Amount)) ...

Regards

VIjay

Not applicable
Author

I had considered that, but there are a lot of expressions, most of which already have at least 1 or 2 layers of filtering already, and to add to this again will only make the expressions more difficult for others to follow.