Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
byzmjv
Regular Visitor

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 3
byzmjv
Regular 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.

v-rzhou-msft
Community Support
Community Support

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 Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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. 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.