Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi
Apologies if this is a simple fix but I cant seem to figure this out.
I have a table 'SOR' that lists tasks assigned to individuals. I want to create a stacked chart to show the top 10 individuals with assigned tasks with various status displayed in the stack. I need to exclude the completed tasks so only outstanding tasks are shown.
I have created a chart without the Status filter with a RANKX measure and this works fine
However I run into trouble when adding the Status column as the Legend as this trashes the RANKX function:
I have tried various things to resolve this such as placing a filter on the RANX function:
Solved! Go to Solution.
The problem is your ranking calculation is being evaluated within the context of the status (applied via the legend). You need to remove that filter inside the ranking calculation.
Top Responsible =
RANKX(
ALL( SOR[Person Responsible] ),
CALCULATE(
COUNT( SOR[Person Responsible] ),
FILTER(
ALL(SOR[Status]),
SOR[Status] <> "Completed"
)
)
)
The above is hard coded to disregard "Completed" status. You could make this more dynamic and apply that filter via the filter pane and use ALLSELECTED...
Top Responsible =
RANKX(
ALL( SOR[Person Responsible] ),
CALCULATE(
COUNT( SOR[Person Responsible] ),
ALLSELECTED(SOR[Status])
)
)
...this would allow users to choose which statuses they want to disregard.
The problem is your ranking calculation is being evaluated within the context of the status (applied via the legend). You need to remove that filter inside the ranking calculation.
Top Responsible =
RANKX(
ALL( SOR[Person Responsible] ),
CALCULATE(
COUNT( SOR[Person Responsible] ),
FILTER(
ALL(SOR[Status]),
SOR[Status] <> "Completed"
)
)
)
The above is hard coded to disregard "Completed" status. You could make this more dynamic and apply that filter via the filter pane and use ALLSELECTED...
Top Responsible =
RANKX(
ALL( SOR[Person Responsible] ),
CALCULATE(
COUNT( SOR[Person Responsible] ),
ALLSELECTED(SOR[Status])
)
)
...this would allow users to choose which statuses they want to disregard.
This was working for me... till the moment i added "Sort by Column" in Model View
what if i would like to show "status" options in specific order ?
What i should do to make it work?
Thank you, that has done the trick, you are a legend!!! (pun intended 😉 )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |