The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Is it possible to have the below Rankx formula filtered on specific peer without the rank showing up as 1?
This is the data set for example, with Peer and Monthly Return being the load from external source.Rank of Total Peers QTD and Total Return QTD being the two measures above.
In PowerBI when using the Dax code below to show just the Target QTD Rank which should show 3, it shows 1.
Is there a solution to filter Target and have the rank show as 3?
Thank you!
Solved! Go to Solution.
Hi,
I am not sure how you will present the end result, but please try something like below if it suits your requirement.
Target Rank =
MAXX (
FILTER (
ADDCOLUMNS (
ALLSELECTED ( 'Import to Powerbi'[Peer] ),
"@rank", [Rank of Total Peers QTD]
),
'Import to Powerbi'[Peer] = "Target"
),
[@rank]
)
Hi,
I am not sure how you will present the end result, but please try something like below if it suits your requirement.
Target Rank =
MAXX (
FILTER (
ADDCOLUMNS (
ALLSELECTED ( 'Import to Powerbi'[Peer] ),
"@rank", [Rank of Total Peers QTD]
),
'Import to Powerbi'[Peer] = "Target"
),
[@rank]
)
Hi Jihwan,
That is perfect, giving the correct result! I appreciate it! 🙂
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |