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! It's time to submit your entry. Live now!
Hi community,
I am preparing the custom visual (vertical line chart) via DENEB in PBI and I would like to set up the sorting values base on two different variables. I tried to find out on different web sites, without success. Is it possible? Could you advice me any solution? thanks Jozef
Solved! Go to Solution.
Hi @Jozef_KaBa ,
Are both variables numbers? If so, you can refer to the following program:
Total = 0.4*[Value1]+0.6*[Value2]
Rank = var _t = ADDCOLUMNS('Table',"Rank",RANKX(ALL('Table'),[Total],,DESC,Dense))
RETURN MAXX(_t,[Rank])
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Dear Scott, many thanks for your explantion.
I am going to implement the code and check.
Regards,
Hi @Jozef_KaBa ,
Are both variables numbers? If so, you can refer to the following program:
Total = 0.4*[Value1]+0.6*[Value2]
Rank = var _t = ADDCOLUMNS('Table',"Rank",RANKX(ALL('Table'),[Total],,DESC,Dense))
RETURN MAXX(_t,[Rank])
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Dear Scott, many thanks for your explantion.
I am going to implement the code and check.
Regards,
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.