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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis expression

Hello all, I'm trying to calculate the total of gross bookings, based on some selections, but can't get it right. the expression I'm using is:

sum({<fiscal = {'$(vFiscal1)'}, [week no.] <= max({{$<fiscal = {'$(vFiscal2)'}>} [week no.]})>} [Gross_bookings])

I select fiscal year equals to vFiscal1, and [week no.] smaller than or equal to the maximum [week no.] available for vFiscal2.

Have been struggling with this for hours, can anybody help me iwith this?

Thanks!!

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

SUM({$<fiscal = {'$(vFiscal1)'}, [week no.] = {"<=$(=Max({<fiscal = {'$(vFiscal2)'}>}[week no.]))"}>}Gross_bookings)

View solution in original post

4 Replies
chiru_thota
Specialist
Specialist

I guess your syntax is wrong

Try to as below .Define a variable and test it fiest.Then use it in set analysis

vWeekno=max({{$<fiscal = {'$(vFiscal2)'}>} [week no.])

sum({<fiscal = {'$(vFiscal1)'}, [week no.] ={'<=$(=$(vWeekno))'}>} [Gross_bookings])

MK_QSL
MVP
MVP

SUM({$<fiscal = {'$(vFiscal1)'}, [week no.] = {"<=$(=Max({<fiscal = {'$(vFiscal2)'}>}[week no.]))"}>}Gross_bookings)

Not applicable
Author

Thanks Chiranjeevi, very helpful

Not applicable
Author

It worked! Thanks very much Manish