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.
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.
Please help
Thanks,
Ram
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)")
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
6 | |
4 | |
3 | |
2 |
User | Count |
---|---|
14 | |
11 | |
5 | |
5 | |
3 |