Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to use this expression IF(Month=max(Month), WorkingDays) in a chart, and I want to get workingdays for the max month without make any selection.This expression works fine if there are selections but doesn;t work if there are no selections.
Am I missing something?
Regards,
Helen
Try the third one...
Update : Have you tried this?
=Max({<Month = {'$(=Max(Month))'}>}WorkingDays)
Try this one also...
=FirstSortedValue(WorkingDays,-Month)
=IF(Aggr(Month,WorkingDays)=max(TOTAL Aggr(Month,WorkingDays)), WorkingDays)
UPDATE...
Use below..
=Max(Aggr(IF(Month = Max(Month), WorkingDays),Month,WorkingDays))
Another Way... Looks OK to me...
=Max({<Month = {'$(=Max(Month))'}>}WorkingDays)
The IF() will only work if you select a single Month value. In all other cases, the left-hand Month will return a list of values that cannot be compared to Max(Month).
What is it you want to display, and where do you want this to be displayed?
Best,
Peter
It doesn't work when there are several values of Month or WorkingDays possible. See It's all Aggregations. You need to specify what the expression should show in such a case, by using an aggregation function.
HIC
Hi Manish,
If you try to apply these expression to the sample I have upload you will see that the first is not working at all and the second returns the max number of workingdays (30) and not the workingdays for the max month (21).....
So, there is no way to get WorkingDays for the max month if there are no selections on month field? ![]()
It's such a simple expression and I am prety sure that was used to be working fine in previous versions of QlikView (7,8 and olders)
Try the third one...
Update : Have you tried this?
=Max({<Month = {'$(=Max(Month))'}>}WorkingDays)
Try this one also...
=FirstSortedValue(WorkingDays,-Month)
Thank you Manish,
your last two suggestions work both perfect for my case.
Regards,
Eleni