Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I’m a bit lost in Power Bi behaviour and I’d like some help to understand et adjust my measure.
To give a bit context, a small part of my model is like this
Viewing is my fact Table which contains some people looking TV
I have a dimension Network and on TOP , another Table DimTVGroupNetwork which contains Group of Newtork.
(Example:
)
If I select a Group and looking on my “classic” measure, like a sum of a field, everything looks fine.
But I have a problem with the RANKX function.
If I create this formula: Rank = RANKX(ALLSELECTED(Network[NetworkDescription]),[Total Weight 2])
The rank is Ok, but I’ve lost my context filter, and it calculates on all the Network.
Now if I select Network separately, it’s ok.
How can I keep my filter context, because all my relationship are bidirectional etc…
Thanks
Thomas
Solved! Go to Solution.
Try nesting it in IF function.
Rank = IF ( [Total Weight 2] > 0, RANKX ( ALLSELECTED ( Network[NetworkDescription] ), [Total Weight 2] ) )
Yes you're Right, Thanks
But still, I don't figure out why the ALLSELECTED() don't keep the Filter
At least it works, so Thx again
Thomas
Try nesting it in IF function.
Rank = IF ( [Total Weight 2] > 0, RANKX ( ALLSELECTED ( Network[NetworkDescription] ), [Total Weight 2] ) )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |