Forum Discussion
Order Values According to Their Absolute Values in Card Visaul
Hi all,
I have a problem with my card visual. I'm using a card visual to show maximum, minimum and latest values. These are numerical. They can get minus and positive sign. But I must order this values descending according to their absolute value.
My problem starts here.
I have converted my values to absolute values, and I can order. But now I need to add text values near these values. These text values will show if the value in negative or positive in its origin.
First I have thought that I can create custom column with if condition and then concenate these columns. But of course it didn't work. I cannot find max value and min value now.
I couldn't find a way to collect all these requirements under a one custom solution (DAX or M-Query)
I need your help.
Thanks
3 Replies
- AnonymousNot applicable
Hi byzmjv ,
Firstly,Power BI Card visual will only return a aggregate value. So how did you show maximum, minimum and latest values in one card visual? Is it a multi-row card?
According to your statement, I think you now want to sort your visual by absolute value, and you can achieve it. However, now you want to add negative or positive near the display value. As far as I know, if you concenate number type data with text type data "+"/"-", then your data will convert to text. Please note that there could be only one column type in Power BI.
I think you can add two calculated columns, one is absolute value with number type another is display value with text type.
ABS = ABS('Table'[Value])Display value = IF('Table'[Value]>=0,CONCATENATE("+",'Table'[ABS]),CONCATENATE("-",'Table'[ABS]))Then sort [Display value] by [ABS].
For refernece: Sort one column by another column in Power BI - Power BI | Microsoft Learn
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- byzmjvRegular Visitor
Thank you very much for your answer and correct me. First I have set as card then I have converted to multi-row card.
Sorry for the confusion.
- byzmjvRegular Visitor
By the way when I tried the slution it didn't worked unfortunately. because it's accepting as a text. But I need to keep as numeric because I need to get current max and minimum value.,Also I'm getting last value as a measure.
I think I need to think any other way.