cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Cloud11
Post Patron
Post Patron

Format Values Dax error

Hi Experts.

 

I have the following dax measure which kind of gives me the right answer..

%= if(left(trim(firstnonblank (grp[ReportHeaders], "")),1)="%",

Format (([measure] /100, "##0.0%;(##0.0%);-"),

Format (([measure], "##0.0;(##0.0);-")

)

 

Which converts  value  -1,800.0 to (1800.0) missing out the comma for thousands and like wide for positive values too.

 

How do I amend.

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@Cloud11 , not tested try if this can work

 

%= if(left(trim(firstnonblank (grp[ReportHeaders], "")),1)="%",

Format (([measure] /100, "#,##0.0%;(#,##0.0%);-"),

Format (([measure], "#,##0.0;(#,##0.0);-")

)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User IV
Super User IV

@Cloud11 , not tested try if this can work

 

%= if(left(trim(firstnonblank (grp[ReportHeaders], "")),1)="%",

Format (([measure] /100, "#,##0.0%;(#,##0.0%);-"),

Format (([measure], "#,##0.0;(#,##0.0);-")

)



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors