Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Buenas tardes,
Tengo un grafico que necesita ser ordenado ya sea por serie o por categoria, depende de que quiera el usuario. Se que manualmente no se puede, por lo que mi pregunta si lo puedo hacer por DAX y cómo sería, Son mis primeros pasos en DAX.
De antemano muchas gracias!
Solved! Go to Solution.
Hi @Huicho_2024,
We can use the following measures to create custom orders in your need as shown below:
OrderByCategory = SWITCH(SELECTEDVALUE('Table'[category]),"A",1,"B",2,"C",3)
OrderBySeries = SWITCH(SELECTEDVALUE('Table'[series ]),"ser1",1,"ser2",2)
Then users could choose different measures to sort by, as shown below:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thks, It works!
Hi @Huicho_2024,
We can use the following measures to create custom orders in your need as shown below:
OrderByCategory = SWITCH(SELECTEDVALUE('Table'[category]),"A",1,"B",2,"C",3)
OrderBySeries = SWITCH(SELECTEDVALUE('Table'[series ]),"ser1",1,"ser2",2)
Then users could choose different measures to sort by, as shown below:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!