Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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
1 Reply
swuehl
MVP
MVP

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)