Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hiya all,
I've not posted before, apologies if this isn't in the right place.
I want to rank clubs by their YOY (year on year) variances - however there are some which may not have any sales this year or last year, in the period/category that has been chosen by the user in the slicer.
I am getting:
Club YOY Rank
------- -------- -------
Club 1 +£500 1
Club 2 +£200 2
Club 3 3
Club 4 -£100 4
YOY is a calculated measure.
This is what I have now :
YOY Rank = RANKX (ALL('Core ClubsVW'),[YOY])
How can I show this as :
Club YOY YOY Rank
------- -------- ----------
Club 1 +£500 1
Club 2 +£200 2
Club 4 -£100 3
Club 3
Please could someone help me?!
Thanks
Hannah
Solved! Go to Solution.
You may refer to DAX below.
YOY Rank =
IF (
NOT ( ISBLANK ( [YOY] ) ),
RANKX (
FILTER ( ALLSELECTED ( 'Core ClubsVW'[Club] ), NOT ( ISBLANK ( [YOY] ) ) ),
[YOY]
)
)
You may refer to DAX below.
YOY Rank =
IF (
NOT ( ISBLANK ( [YOY] ) ),
RANKX (
FILTER ( ALLSELECTED ( 'Core ClubsVW'[Club] ), NOT ( ISBLANK ( [YOY] ) ) ),
[YOY]
)
)
Thanks Sam.
Regards,
Madawa
Love this, thank you! Couldn't have done it without your help 🙂
I've amended it slightly so that it:
1) doesn't filter on selected (I want to show estate rank, even if you choose region in a slicer)
2) has a filter on open clubs
3) only shows if hasonevalue (so that it doesn't show a total at the bottom)
YOY Estate Rank =
IF(
HASONEVALUE('Core ClubsVW'[CostCentre]),
IF (
NOT ( ISBLANK ( [YOY] ) ),
RANKX (
FILTER ( ALL ( 'Core ClubsVW' ), NOT ( ISBLANK ( [YOY] ) ) && 'Core ClubsVW'[OpenFlag]=1),
[YOY]
)
),
"")Thanks SO much.
Hannah
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 69 | |
| 32 | |
| 32 | |
| 32 |