Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having the problem with ranking.
I am try to display ranks on two places, in a straight table and in text box - but I receive different numbers of ranks here:
Here is the expression I am using for a chart:
rank(
(Sum({<SiteDealerNo={'*'}, ContractDealerNo=>}[request Quantity])
-Sum({<Year={$(=max(Year)-1)}, SiteDealerNo={'*'}, ContractDealerNo=>}[request Quantity]))
,0,1)
The dimension is ContractDealerNo
And this is the expression I am using for the text box, with the aggr:
=
aggr(
rank(
Sum({$<SiteDealerNo={'*'}, ContractDealerNo=>}[request Quantity])
-Sum({$<Year={$(=max(Year)-1)}, SiteDealerNo={'*'}, ContractDealerNo=>}[request Quantity])
,1,0)
, ContractDealerNo)
---
Now I tried to put both of them in a straight table - and I get different result for the contract:
Just One my discovery is, that I I don't use the subtraction of the last Year and Rank just this Year, it seems correct.
Does someone has any Ideas why is this different and how might I fix this?
Thank you.
The two expressions are slightly different (except for Aggr())
Nope, still the same.. I actual had it the same from start in the table.. I tried different rank parameters, all still gives same result.
Would you be able to add a sample to check this out?
Well, I found the culprit, which was the rounding. The round function with num helped. (So maybe for next generations).