Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello everyone !
I'm trying to rank my total weight per client (name 1 in the matrix).
To do this, I used this formula which gives me a correct ranking :
Ranking =
VAR Customers =
ALLSELECTED(ZV048[Name 1])
VAR Result =
CALCULATE(
RANKX(Customers, ZV048[Total weight formula],, DESC, DENSE ),
REMOVEFILTERS( ZV048 ),
VALUES('Calendar'[Date].[Année]),
VALUES(ZV048[Name 1]),
ALLSELECTED(ZV048[Shipping type])
)
RETURN
Result
However, when I use my Shipping type filter, the ranking does not act intelligently :
Indeed, by choosing a shipping type filter I would like to have a ranking starting from 1.
Any idea?
Thank you.
Regards,
Ilias
Solved! Go to Solution.
Hi @Anonymous ,
Please check this formula.
Ranking =
CALCULATE (
RANKX (
FILTER (
ALLSELECTED ( ZV048 ),
ZV048[Name 1] = SELECTEDVALUE ( ZV048[Name 1] )
),
ZV048[Total weight formula],
,
DESC,
DENSE
),
ALLSELECTED ( 'Calendar'[Date].[Année] )
)
If it doesn't work, please share the pbix to us so that we could test formula.
Best Regards,
Jay
Hi @Anonymous ,
Please check this formula.
Ranking =
CALCULATE (
RANKX (
FILTER (
ALLSELECTED ( ZV048 ),
ZV048[Name 1] = SELECTEDVALUE ( ZV048[Name 1] )
),
ZV048[Total weight formula],
,
DESC,
DENSE
),
ALLSELECTED ( 'Calendar'[Date].[Année] )
)
If it doesn't work, please share the pbix to us so that we could test formula.
Best Regards,
Jay
@Anonymous , Try
RANKX(Summarize(allselected(ZV048), ZV048[Name 1],'Calendar'[Date],ZV048[Shipping type] ), ZV048[Total weight formula],, DESC, DENSE )
Thank you @amitchandak ,
Here is the result using this formula :
Various clients have the same ranking.
And using a shipping type filter:
Maybe something wrong with my Total weight formula ?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
85 | |
83 | |
74 | |
49 |
User | Count |
---|---|
142 | |
139 | |
110 | |
69 | |
55 |