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 guys!
I have a dimension table of Assets, and I'm doing a three-step ranking filtering, being that after each rank filter the number of assets analyzed is restrained.
I created independent slicers for each ranking (Market Value, Volatility and "P/BV", known as Price/Book-to-Value), but when I apply the third ranking it filters the Assets of the first rank's selection (Mkt Value):
I would like to restrain the Assets range to the codes in the volatility ranking (AESB3, ABCB4 and TTEN3), and then apply the P/BV rank. The expected result would be this:
This is the link to the example pbix: https://drive.google.com/file/d/1N_g1fl5zkXibp6vNwy9s_oBifJCiGu0n/view?usp=sharing
Could anyone give me an advice on this problem please?
Thanks!
Didn't manage yet to do it 😬, anyone willing to help? 😅
TopN 3 P/BV =
VAR SelectedTop = SELECTEDVALUE('TOPN 3'[Top N 3])
RETURN
CALCULATE(
SWITCH(
TRUE(),
SelectedTop = 0,
[_Rank Switch P/BV],
[_Rank Switch P/BV] <= SelectedTop,
[_Rank Switch P/BV]
),
SelectedTop will never be zero. You would need to use the standard measure trick
VAR SelectedTop = 0+SELECTEDVALUE('TOPN 3'[Top N 3])
Adjust your other measures accordingly. Note: You may need to compute your TOPN dynamically because the TOP N 3 filter should only allow you to select whatever has been prefiltered in Top N 2. (In your example Top N 3 should only allow you to select from 1 to 3 items, no?)
@lbendlin, could you please talk a little bit more about the standard measure trick (what is it for, etc.)?
If there is a threat that a measure could return BLANK() you can add a 0 to the measure output to return at least "something" without skewing the final result.
ahhh got it! Thanks a lot 😄
Ahh you're right @lbendlin!
Indeed, Var SelectedTop won't be zero and TOP N 3 filter should only allow me to select whatever has been prefiltered in Top N 2. Thank you very much for your time, I'll try it out! 🙏🙌
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |