Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
Why i am not getting same result with Above function used in two different expression , below :
1) Sum({1<Year={"=Above(Year)"}>}[Foreign Exchange Reserves in US Dollar - Total])
2) Above([Foreign Exchange Reserves in US Dollar - Total],1)
Thanks & Regards
Shekar
I guess the behavior could be explained like below:
The trick is the '=' sign in the set ( '=Above(Year)'). When we put that, set analysis actually gets evaluated for TRUE condition of the field. Like, if you write : Customer={"=Sum(Sales)>0"}, then we are searching for those customers against whom the condition is true; and not for specific values of customers. Similarly, when we write Year={"=Above(Year)"}, it sees if there is an above value for that year (if it has an early/above value then it's a TRUE) or not. And obviously, it's true (present) for all the years except the first one.
If we use below() instead, we would see all the values except the last one.
I am sure that the same (what I am trying to express) could have been explain in a much better way, but hope - what I wrote is conveyed and makes sense.
maybe change here?
2) Above([Foreign Exchange Reserves in US Dollar - Total],0)
0 instead of 1
I doubt that the Above() inside the set expression is working at all. Above() is a chart function, while the set expression is executed before the chart is constructed. So the Above() function has no context and will probably return null.. The set expression will fail silently (ie be ignored) so your first expression will be effectively:
Sum({1} [Foreign Exchange Reserves in US Dollar - Total])
or
Sum([Foreign Exchange Reserves in US Dollar - Total])
sorry, misunderstand the problem
You want to see which one?
Hi Jonathan ,
So you mean to say that , Above function should not be used with set expression as an ideal case . Please correct me , if i got it wrong .
Hi Anil ,
I wanted to know that , what is wrong with my first expression .
I agree with jontydkpi... I don't think Above is even working.... I would have thought for it to show no result at all... but it seems that the set analysis is ignored.... the reason I though it would not work is because if you create a chart with Year as dimension and Above(Year) as expression... you would see that Year is never equal to Above(Year)
Since the set analysis you have used is a search string... only those years where Year = Above(Year) should be included... but that never happens... so nothing should be included...
But that is not what happens, it appears as though the complete year set analysis part is completely ignored... don't know why.... may be hic can tell why
If someone like Sunny is not sure , then think of my situation . .
Anyways i am glad that , there is finally something about which Sunny is not sure ... ..
Interest Question