Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.