Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning (again) from Germany,
I have a little problem with Set Analysis and the previous year.
(Count({$<MasterYear = {"=$(=(MasterYear-1))"},
DateType = {'Contract_End_Real'}>}DISTINCT(Contract_Key)))
The expression should count the Contract_Keys for the selected Year-1.
It is working very well with smaller (<), greater(>), <= or >=. Only with equal it doesn't work. The -1 is actually ignored in that case with equal
Any idea why?
Hi!
Could you try this?
(Count({$<MasterYear = {$(=(MasterYear-1))},
DateType = {'Contract_End_Real'}>}DISTINCT(Contract_Key)))
Hi!
Could you try this?
(Count({$<MasterYear = {$(=(MasterYear-1))},
DateType = {'Contract_End_Real'}>}DISTINCT(Contract_Key)))
Hi Targa, I'll suggest to set the expression ina table without expression label, this way, setting the mouse on the title you can see how QV is expanding "=$(=(MasterYear-1))", looking this will give you a hint of what's happening.
Maybe is beacuse this is returning null() because MasterYear has more than one possible value, if this is the case you can use:"=$(=(Max(MasterYear)-1))"
Thank you, its working.
But, can you explain it a little bit why?
Thats right.
The calculation doesn't work if you select more than one year. But it seems that this was not the problem.
Actually, for the complete calculation/analyse (That was only one part from a measure calculation) you would never select more than one year. That would be pointless
So the solution from the russian guy is enough.