Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

qv_testing
Valued Contributor

Dynamic Format in Bar chart

Hi Community,

I have developed one chart based variable selection it will change the SalesAmount and Sales%.

Expression 1:

Sum(Sales)

Expression 2:

Num(Sum(Sales)/Sum(Total Sales), '##,#0.00%')

Note: Num format not working, like showing 0.63. I have to convert into 63%


these expression's changing based on toggle button. (Amount and Percentage)


In Qlikview NUM format works fine, but qlik sense not working.


I have read this document... https://community.qlik.com/thread/161478

but not working..


Please anyone can help me....


Thanks in Advance....



5 Replies
qv_testing
Valued Contributor

Re: Dynamic Format in Bar chart

single expression working fine

NUM(Sum(Sales)/Sum(TOTAL Sales),'##,##0.00%')


But my expression like,

If(Category='A', Sum(Sales), Num(Sum(Sales)/Sum(Total Sales), '##,#0.00%'))

this else part not converting percentage...

qlik_aparnav
Contributor II

Re: Dynamic Format in Bar chart

Try doing like this

In measures tab->number formatting-> give measure expression

qv_testing
Valued Contributor

Re: Dynamic Format in Bar chart

Based on selection Integer and Percentage.


If i click Integer i want to show Sales number

Percentage i want to show Sales percentage....

qlik_aparnav
Contributor II

Re: Dynamic Format in Bar chart

I have attached an app for reference. I'm getting the results you specified.

qv_testing
Valued Contributor

Re: Dynamic Format in Bar chart

HI Aparna,

You didn't get my point... I'm also getting like this.....

Capture.PNG

if you use or not that NUM format that will show 0.16 like ....

I want to show 63% in chart..

a.PNG

see here, i have used single expression..

Num(Sum(Sales)/Sum(total Sales),'##,#0.00%'), showing exactly what i want...  (63.26%, 16.62%.....etc)

hope you understand....

Community Browser