Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to change the format of an expression if a value is different

I have a pivot table shown below:

What I need to do is have the Gross Margin @ FGS shown as a percent instead of like the other numbers.  Would it be possible to do this????

Here's how I have the expression written:

if ( Measure<>'Gross Margin @ FGS',

sum({<FYEAR={$(vBenchYr)},QUARTER={'Q4'}>}(Value)), vGrossMargin)

So I set the vGrossMargin number format at the document properties level to show in percent but it has taken the form of the column which is fixed with no decimal places.

Is there a way to get only the last item as a percent???? I want it to show 53.4%

1 Solution

Accepted Solutions
mambi
Creator III
Creator III

Num( (vGrossMargin)/100,'#,##0%')

View solution in original post

8 Replies
mambi
Creator III
Creator III

i think you can use this :

if ( Measure<>'Gross Margin @ FGS',

sum({<FYEAR={$(vBenchYr)},QUARTER={'Q4'}>}(Value)),Num( (vGrossMargin),'#,##0%') )

Not applicable
Author

I tried that & it doesn't seem to work.

Not applicable
Author

Scratch previous reply.  I had to go in and change the number format for the expression to expression default.

mambi
Creator III
Creator III

does it work  ?

Not applicable
Author

It does work now but I need it to say 53.4% and it is showing 5336.90%

mambi
Creator III
Creator III

Num( (vGrossMargin)/100,'#,##0%')

Not applicable
Author

I did Num( (vGrossMargin)/100,0.0%') and that did it.

Thanks!!!

mambi
Creator III
Creator III

don't forget to mark your post as solved