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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis explanations

Hi guys,

I need some clues about set analysis. Something i must have forgotten

1. 

this is the result of a year and 2 months selection using set analysis

Sum ({<Dte.YearMonth={$(=max(Dte.YearMonth))}>} Rev.[Amount])

according to this model

2. I'd like to understand I can't use this

Sum ({<Dte.YearMonth={$(<=max(Dte.YearMonth))}>} [Rev.Amount])   (note <=)  to have a YTD result with 1 year and 1 month selected?

The following set works with RevYear and Rev.month

sum ({<[Rev.Year]={'$(vMaxYear)'}, [Rev.Month]={'<=$(vMaxMonthNum)'}, Dte.Year=, Dte.Month=>} [Rev..Amount])

But why not with Dte.Year and Dte.month

Thnak you

Chris

1 Solution

Accepted Solutions
dirk_konings
Creator III
Creator III

try this one :

Sum ({<Dte.YearMonth={'<=$(=max(Dte.YearMonth))'}>} [Rev.Amount])


Dirk

View solution in original post

4 Replies
dirk_konings
Creator III
Creator III

try this one :

Sum ({<Dte.YearMonth={'<=$(=max(Dte.YearMonth))'}>} [Rev.Amount])


Dirk

Clever_Anjos
Employee
Employee

You´re misplacing the <=

The correct would be

Sum ({<Dte.YearMonth={<=$(=max(Dte.YearMonth))}>} [Rev.Amount])

Clever_Anjos
Employee
Employee

Be careful that Max() return a not formatted number, so you should format it too

Sum ({<Dte.YearMonth={<=$(=date(max(Dte.YearMonth),'MM/DD/YYYY'))}>} [Rev.Amount])

Not applicable
Author

Hi Guys

thank you for your answers.

Jus a metter of a very little '=' sign

have a nice day

Chris