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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Yousef_Amarneh
Partner - Creator III
Partner - Creator III

Total Expression

Hi All,

I am facing a problem, I need to calculate total of a specific measure regardless selections except Year and Month, that mean the total depend  on the time

I used the following expression but it doesn't work

Sum({1<Year=P(Year),Month=P(Month)>} Total Amount)

Please it's urgent.

Thanks,

Yousef Amarneh

Yousef Amarneh
Labels (1)
1 Reply
swuehl
Champion III
Champion III

Would be helpful if you tell us what exactely doesn't work, i.e. what you get and what you expect.

I assume if you select in a field connected to Year, but not in Year, you still get a filtering of the records because of the p() function, while you expect to see the total unfiltered.

Try creating an alternate state (settings - document properties - alternate states), call it e.g. AS, then use

=Sum({AS<Year=$::Year,Month=$::Month>} Total Amount)