Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi guys,
I have a table that has 10 rows and first row being the header column. Is there anyway to set different number formatting to different rows.
I need first rows values in integer format and rest in %.
Header 1 | Header 2 | Header 3 |
---|---|---|
ABC | 333 | 4567 |
PQR | 10.00% | 20.00% |
LMN | 6.99% | 2.33% |
XYZ | 67.00% | 12.36% |
Regards,
Viresh
Can you share sample data
You can def. do this. This can be based on the dimension itself or RowNo()
If([Header 1] = 'ABC', Num(Expression, '##'), Num(Expression, '##.00%'))
or
If(RowNo() = 1, Num(Expression, '##'), Num(Expression, '##.00%'))
or some variation of both of these based on your actual data
Hi Viresh,
Are there any distinguishing factors in any of the Header 1 names that you can identify as being a number or %? If so, I would create a flag in the script to identify this fact.
if(Header1 = 'ABC', 1, 2) AS Flag.Header1
Then in any of your tables, you can use something like:
if(Flag.Header1 = 1, Num(Header2, '#,##0'), Num(Header2, '0.00%'))
I am using the below expression i am not getting the format.
If(cat = 'ABC', Num([42401], '##'), Num([42401], '##.00%'))
This is the sample data:
Cat | 1-Feb | 1-Mar |
ABC | 100 | 200 |
PQR | 45 | 89 |
LMN | 77 | 88 |
I think 'c' of Cat should be in upper case.
Make sure to select Expression Default formatting on the Number's tab of your chart properties
yeah i corrected it, thanks
I'm getting the below result
ABC 1e+002 2e+002
PQR 4500.00% 8900.00%
Try this:
=If(Cat = 'ABC', Num(Value, '##.'), Num(Value/100, '##.00%'))