Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Guys,
I need your support. As example I created a very short matrix table which looks like following:
Let's please focus on TFY24 where I wanted to have a separate measure for that fiscal year. The value I created in DAX as following including showing the correct Profit% margin:
so far so good. Now I added another column in front of my KPI column. It is a "sorting" column in order to sort the KPIs in a very efficient approach which I like. However and unfortunately suddenly my Profit margin is disappearing. Currently I do not understand why I would have to adjust my TFY24 formula as I thought it is related to the KPI dimension but not to any sorting dimension. Do you have any idea. Looks like this now (sorting is correct and my idea was to hide the column in the end):
Many thanks for your support.
Solved! Go to Solution.
Thanks for the reply from AntrikshSharma , please allow me to provide another insight:
Hi @M_Chris ,
Power BI default sorting is alphabetical, if your data [KPI] has multiple identical values in a table or there is a circular dependency problem, you may consider creating a new table to customize the sorting.
Create calculated table:
SUMMARIZE(
'Table',[KPI],"Rank",SUMX('Table',[Value]))
Select [KPI] – Column tools – Sort by column – [Rank].
Joins the relationship between two tables.
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply from AntrikshSharma , please allow me to provide another insight:
Hi @M_Chris ,
Power BI default sorting is alphabetical, if your data [KPI] has multiple identical values in a table or there is a circular dependency problem, you may consider creating a new table to customize the sorting.
Create calculated table:
SUMMARIZE(
'Table',[KPI],"Rank",SUMX('Table',[Value]))
Select [KPI] – Column tools – Sort by column – [Rank].
Joins the relationship between two tables.
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@M_Chris After RETURN return each variable and see what it returns with and without the sorting column, focus on where it deviates, it could be that SELECTEDVALUE is returning BLANK
RankingCM_2 column is in the same table as the KPI column?
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 |
---|---|
10 | |
9 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
13 | |
11 | |
9 | |
9 |