Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mstoler
Partner - Specialist

Display a value for a dimension with 1 decimal place

Hello,

I have a requirement to display Gloves with 1 Decimal Place and Jeans with 0 Decimal places.

Looking for some suggestions.

Thank You,

Michael

 

mstoler_0-1620832767543.png

 

1 Solution

Accepted Solutions
jwjackso
Specialist III

You could create a table

FMT:

load * inline[

Product,FMT

Jeans,'#.'

Gloves,'#.0'

];

Still set the Number formatting to expression,

Num(Sum(Amount),FMT)

 

View solution in original post

3 Replies
jwjackso
Specialist III

Set the measure "Number formatting" to Expression.  In the measure

=If(Product='Jeans',Num(Sum(Amount),'#.'),Num(Sum(Amount),'#.0'))

 

mstoler
Partner - Specialist
Author

Hello,

That is what I thought.  

I don't like to use if statements because it may slow things down.  Is there another solution?

 

Michael

jwjackso
Specialist III

You could create a table

FMT:

load * inline[

Product,FMT

Jeans,'#.'

Gloves,'#.0'

];

Still set the Number formatting to expression,

Num(Sum(Amount),FMT)