Forum Discussion
sort visual by 2 variables
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
- Anonymous2 years ago
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 ChangIf 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,
2 Replies
- AnonymousNot applicable
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 ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Jozef_KaBaNew Member
Dear Scott, many thanks for your explantion.
I am going to implement the code and check.
Regards,