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: 
deepakqlikview_123
Specialist
Specialist

Showing MTD values

Hi All,

Currently I want to show the values for max year -2 in a manner that whenever i can select apr values should be jan+feb+mar for max year -2

=Sum({<Year={'$(=(max(Year)-2))'},Month_Num={'<=$(=max(Month_Num))'},[Mining New]={"Mining"}>}Total)

But my expression not working whenever i am selection month.

Can you please suggest what changes i need to do in expression.

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

if you have Year as a dimension, then use below

=Sum({<Year={">=$(=(max(Year)-2))"},Month_Num={"<=$(=max(Month_Num))"},[Mining New]={"Mining"}>}Total)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
vinieme12
Champion III
Champion III

if you have Year as a dimension, then use below

=Sum({<Year={">=$(=(max(Year)-2))"},Month_Num={"<=$(=max(Month_Num))"},[Mining New]={"Mining"}>}Total)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Not applicable

Since you select april using the month field you have add it to the experssion :

=Sum({<Year={'$(=(max(Year)-2))'},Month_Num={'<=$(=max(Month_Num)-1)'},[Mining New]={"Mining"},Month>}Total)