Skip to main content
Announcements
Join us on Sept. 17 to hear how our new GenAI Assistant empowers data professionals: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
DominiC181
Contributor II
Contributor II

decimal places problem

Hi everyone.

I have a problem -  I can't set the number of decimal places.

My measure:

=(If (v_currency= 'CZK',NUM(Sum({1<S3={'F'},Date_YM={'2022-04'}>}[Sales CZK]),'#.##0'),NUM(Sum({1<S3={'F'},Date_YM={'2022-04'}>}[Sales USD]),'#.##0,0'))/1000000)

 

I need for my result in USD to set up 1 decimal place

And for the results in CZK set up no decimal places.

But it is not working, I still see my result in USD with two decimal places.

I have deleted the format pattern, but my results in the table correspond with the number format as you can see in example (1000.12).

DominiC181_0-1649242267915.png

 

 

Thanks for any advice.

1 Solution

Accepted Solutions
Or
MVP
MVP

You'll need to set your number formatting to "Measure expression" if you want the measure expression to control the formatting. Note that it is advisable to finish doing the math and then applying num() to the result, rather than applying num to something and then later dividing it by 1000000.

 

View solution in original post

2 Replies
Or
MVP
MVP

You'll need to set your number formatting to "Measure expression" if you want the measure expression to control the formatting. Note that it is advisable to finish doing the math and then applying num() to the result, rather than applying num to something and then later dividing it by 1000000.

 

DominiC181
Contributor II
Contributor II
Author

Hi,

 

thank you :-).

I didn't know about this possibility. It works great.

Have a nice day.