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: 
suvechha_b
Creator III
Creator III

Need Help

Can anyone suggest how to write the expression :

=sum({<{vMaxYear},{vMPeriod}>}[Actual Units])

Note :

vMaxYear,vMPeriod are variables.

4 Replies
suvechha_b
Creator III
Creator III
Author

How to calculate sum([Actual Units]) depending on two variable given below

vMaxYear , vMPeriod .


How to write the expression ?


Thanks,

mphekin12
Specialist
Specialist

Will this work:

sum({<Year={$(vMaxYear)}, Period={$(vMPeriod)}>} [Actual Units])

nizamsha
Specialist II
Specialist II

sum( {$<year={"$(=Max(year))"},month={"$(=Max(Month))"}>}actual unit)

v_iyyappan
Specialist
Specialist

Hi,

What you arrive in period variable? Whether its date means please check the date format are same in variable and Period column name.

Use like this

=Sum({<Year={$(vMaxYear)}, Period={$(vMPeriod)}>}[Actual Units])

Regards,