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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Custom Number Formatting in Power BI Report Builder

Hi Team,

 

I am really frustrated and struggling to make one of the CHILD group numbers to be formatted as % while the rest of all should be in CURRENCY [$].

 

Here is the example where I am trying to format my last ROW where the row label is "Pct Difference" and the rest of the label rows should be formated as CURRENCY.

 

So far I have tried multiple Expressions but unable to get the desired results.

Few of the expressions I have tried till now;

1. =IIF(Fields!Child2.Value = "Pct Difference", FormatPercent(Fields!asset_curr.Value, "Dataset1",0), "Default")

2. =IIF(Fields!Child2.Value = "Pct Difference", FormatPercent(Fields!asset_curr.Value, "Dataset1"), '$'#,0.00;('$'#,0.00))

3. =IIF(Fields!Child2.Value = "Pct Difference", Format(Fields!asset_curr.Value, 0.00%), Format(Fields!asset_curr.Value,'$'#,0.00;('$'#,0.00)))

4. =IIF(Fields!Child2.Value = "Pct Difference", Format(Fields!asset_curr.Value,"P1"),"")

 

This is the expected output I am trying to achieve.

ram_ram_0-1612009408302.png

Please help

 

Thanks,

Ram

2 REPLIES 2
d_gosbell
Super User
Super User

Where are you setting this expression? If you just right click on the cell and edit the Expression you are setting the expression on the value property, But you can use expressions in almost all the properties in Report Builder. I woud suggest trying to set the Format property of the cell using an expression something like the following:

 

=IIF(Fields!Child2.Value = "Pct Difference", "0,00%;-0.00%" , "$#,0.00;($#,0.00)")

josef78
Memorable Member
Memorable Member

Hi,

First, try ask in another formum: DAX commands and tips

 

Second, I think is not good idea use multiple measures/scales in single column, better is design it with multiple measure columns (like Count, Amount, AmountDifference, AmountDifferencePct), but I do not know story behind it.

 

But, in case when need format single column by different way you can use if, switch and format function. Also depends if you need row level value, or measure. If row level value it is easy

IIF(Fields!Child2.Value = "Pct Difference", Format(Fields!asset_curr.Value, "0.00%"), Format(Fields!asset_curr.Value,"\$#,0.00"))

If it is measure you can try:

Solved: Re: DAX expression using specific field - Microsoft Power BI Community

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.