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
Stuznet
Helper V
Helper V

Round Millions to more readable digits and Display as $ currency

Hi guys,

 

I'm having problem rounding numbers to more readable digits and struggle with the formatting.

 

Here is the original function before I tried to round it 

 

Measure = SWITCH(TRUE(),
    
MAX(Table2[Category]) = "Value",
CALCULATE(SUM(Table1[Amount]),
FILTER(Table1,SEARCH("(25%) - (10%)",[Percent],1,0))))

 

Here is my function that I modified but I received an error 

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

Measure = SWITCH(TRUE(),
    
MAX(Table2[Category]) = "Value",
ROUND(CALCULATE(SUM(Table1[Amount]) / 1000),
FILTER(Table1,SEARCH("25% - 10%",[Percent],1,0) )))

I would like it to display $747 with the currency sign (Is there a function I can write to display the currency beside using the Modeling ribbon?)  and I would like the numbers display in the Table visualization and not in the Card visualization.

 

 

2018-10-02_9-54-37.png

 

Thank you all 🙂

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

I must say I don't really get what you're trying to achieve, so not sure how to help you

 

in general you can use format in the following way:

Formatted Measure = FORMAT ( [Measure], "$#,##0" )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

4 REPLIES 4
Stachu
Community Champion
Community Champion

you can use FORMAT to do that

https://msdn.microsoft.com/en-gb/query-bi/dax/format-function-dax



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

@StachuI tried to used that function but I don't know how to make it to work.

Stachu
Community Champion
Community Champion

I must say I don't really get what you're trying to achieve, so not sure how to help you

 

in general you can use format in the following way:

Formatted Measure = FORMAT ( [Measure], "$#,##0" )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Thank you for the tips.

 

This is how I wrote my measure

Measure = SWITCH(TRUE(),
    
MAX(Table1[ID]) = "ABC",
    FORMAT([Count of ID],"#,##0")

MAX(Table1[Account]) = "ACC",
    FORMAT([Count of Account],"$#,,"))

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.