Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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! 🙏🙌
User | Count |
---|---|
89 | |
75 | |
69 | |
65 | |
58 |
User | Count |
---|---|
103 | |
94 | |
74 | |
60 | |
59 |