Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts!
I have a complex dimension expression that I am using for selection purposes. It only references one field (postingDate):
=if(postingDate=Today(1),
Dual(
'*Today ' & Date(postingDate,'WWW d MMM yyyy'),
postingDate
),
Date(postingDate,'WWW d MMM yyyy')
)
When a user selects a date, the selection shows the full expression as the title of the selection.
This doesn't really matter, but the problem is that I also have a month to date expression like this:
sum({$ <CalendarYear, Month, postingDate={">=$(=MonthStart(Min(postingDate)))<=$(=Max(postingDate))"}>} lcAmount)
This works fine if you select from the actual posting date field, but does not work if you select the complex table selection.
Any ideas? I want to keep the table for selection because it highlights weekends and colours alternate weeks:
Hi,
you need to use aggr() in your calculated dimension expression to scope the selection. See details in this great post by @rwunderlich:
https://qlikviewcookbook.com/2016/01/scoping-selections-with-aggr/
Hope this helps.
Juraj
Hi,
you need to use aggr() in your calculated dimension expression to scope the selection. See details in this great post by @rwunderlich:
https://qlikviewcookbook.com/2016/01/scoping-selections-with-aggr/
Hope this helps.
Juraj
Is your MTD formula is correct?
sum({$ <CalendarYear, Month, postingDate={">=$(=MonthStart(Min(postingDate)))<=$(=Max(postingDate))"}>} lcAmount)
For me, This should be like
sum({$ <CalendarYear, Month, postingDate={">=$(=MonthStart(Max(postingDate)))<=$(=Max(postingDate))"}>} lcAmount)
Thanks I'll try that!