Forum Discussion
Anonymous
5 years agoNot 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
- Anonymous5 years ago
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)")))
1 Reply
- AnonymousNot 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)")))