Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Folks,
With this DAX i am able to get top n plans but whenever i want to include product inside these plans in legends, I am unable to use top N filter and also it is showing abrupt values
I think this is related to DAX but i am not able to figure out, Tried crossjoin but with that also didn't got relevant result
Hi again, @Django46,
could try to create a measure like this:
topNPlans =
VAR _plan =
CALCULATE ( SELECTEDVALUE ( Sales[Plan] ) )
RETURN
CALCULATE (
COUNTROWS (
FILTER (
FILTER (
ADDCOLUMNS (
VALUES ( Sales[Plan] );
"rank"; RANKX ( ALL ( Sales[Plan] ); CALCULATE ( SUM ( Sales[Sales] ) ) )
);
[rank] <= 2
);
Sales[Plan] = _plan
)
);
ALL ( Sales[Product] )
)
and then use this measure as filter for you visual, topNPlans>=1:
Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
It is not helping
I would like to help you with your problem. Could you please share your report, or create and share a sample report?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
71 | |
37 | |
21 | |
19 | |
15 |
User | Count |
---|---|
125 | |
33 | |
27 | |
24 | |
23 |