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
Anonymous
Not applicable

DAX Formula Error for Text and number formatting

Hi Experts

 

I am trying to format the value column in FACT APst Due by adding a new calculated column.... see measure. Its not converting the % as percentage value and putting a ( ) around the negative number...

 

Can see my error.

See sample file...

https://www.dropbox.com/s/cdxsi40fukil83k/Test_.pbix?dl=0 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Solved it

Value Formated = IF(TRIM('FACT Past Dues'[REGION])="Past Due %" ||
TRIM('FACT Past Dues'[Periods])="Jan 20 Act %" ||
TRIM('FACT Past Dues'[Periods])="Feb 20 Act %",
FORMAT('FACT Past Dues'[Value],"0.0%;(0.0%)"),
IF(TRIM('FACT Past Dues'[Periods])="Jan Act vs. Goal 2.0% (Fav / Unfav)" ||
TRIM('FACT Past Dues'[Periods])="Feb Act vs. Goal 2.0% (Fav / Unfav)",
FORMAT('FACT Past Dues'[Value],"0.0;(0.0) pts"), FORMAT('FACT Past Dues'[Value], "0.0;(0.0)")))

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Solved it

Value Formated = IF(TRIM('FACT Past Dues'[REGION])="Past Due %" ||
TRIM('FACT Past Dues'[Periods])="Jan 20 Act %" ||
TRIM('FACT Past Dues'[Periods])="Feb 20 Act %",
FORMAT('FACT Past Dues'[Value],"0.0%;(0.0%)"),
IF(TRIM('FACT Past Dues'[Periods])="Jan Act vs. Goal 2.0% (Fav / Unfav)" ||
TRIM('FACT Past Dues'[Periods])="Feb Act vs. Goal 2.0% (Fav / Unfav)",
FORMAT('FACT Past Dues'[Value],"0.0;(0.0) pts"), FORMAT('FACT Past Dues'[Value], "0.0;(0.0)")))

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.