Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can someone please help me with the number format? I want to implement 3 significant figures in my dashboard.
Please find the sample dashboard and a screenshot explaining the requirement.
Thank you.
Regards,
Sachin
Try this expression:
=If(Len(SubField(Num(Sum(Price), '#,##0.0'), '.', 1)) >= 3, Num(Sum(Price), '#,##0'),
If(Len(SubField(Num(Sum(Price), '#,##0.0'), '.', 1)) = 2, Num(Sum(Price), '#,##0.0'), Num(Sum(Price), '#,##0.00')))
Bar for C need to have one decimal and other bars need to be integer? Is that your requirement?
Nope Sunny.
Every time the output should have 3 digits.
If it is 564.324, it should be displayed as 564.
If it is 0.212, it should be displayed as 0.21.
May be this as your expression:
If(Stock = 'C', Num(Sum(Price), '#,##0.0'), Num(Sum(Price), '#,##0'))
Oh okay, that makes sense
question
I can see how the first bar is rounded to 549 (from 548.806) but how come the last bar was still has a decimal?
Is bar C supposed to be formatted differently? what about bar b - in the example they have the same values but what about if they have decimals in them?
Hi Adam,
Every time the output should have 3 digits.
If it is 564.324, it should be displayed as 564.
If it is 0.212, it should be displayed as 0.21.
Try this expression:
=If(Len(SubField(Num(Sum(Price), '#,##0.0'), '.', 1)) >= 3, Num(Sum(Price), '#,##0'),
If(Len(SubField(Num(Sum(Price), '#,##0.0'), '.', 1)) = 2, Num(Sum(Price), '#,##0.0'), Num(Sum(Price), '#,##0.00')))
based on that explanation, it sounds like sunny's first suggestion would ensure that, regardgless of the stock, since it is looking at the length of the field for each stock, and not looking at the values differently
I updated the qvw to have stock d and are showing side by side how it looks unformatted and then applied sunny's first formatting - If I understand, this is what you are looking for