Forum Discussion
Converting Calculated column into Measure or IF statement return Alternative
Hi Everyone,
How can I convert this Dax to measure,
- Anonymous2 years ago
Hi Rabi ,
Based on your description, I'm wondering that you want to change a negative number in a column of data to a positive number and replace the positive number with a "-"
I did a simple test and the result is as follows:
CARER EXCESS = VAR _1= if(MIN('Table'[Number]) <0,MIN('Table'[Number]),0)*-1 VAR _2 = IF(_1 = 0,"-",_1) RETURN _2Please feel free to correct me and provide more information if I have misunderstood you!
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- AnonymousNot applicable
Hi Rabi ,
Based on your description, I'm wondering that you want to change a negative number in a column of data to a positive number and replace the positive number with a "-"
I did a simple test and the result is as follows:
CARER EXCESS = VAR _1= if(MIN('Table'[Number]) <0,MIN('Table'[Number]),0)*-1 VAR _2 = IF(_1 = 0,"-",_1) RETURN _2Please feel free to correct me and provide more information if I have misunderstood you!
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- vicky_Super User
You can probably do so using the Dynamic Formatting Strings if you have a more recent version of powerbi: https://www.sqlbi.com/articles/introducing-dynamic-format-strings-for-dax-measures/.