Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

manoranjan_321988
New Contributor

Num Format

Hi all,

 

Below expression is not working in the line chart 

if(MetricId=1,
(sum([Gross Sales])/1000000)&'M',if(MetricId=2,num((sum(Units)/sum([Target Units])),'#.##%')))

 

pls suggest.

How to achieve this 

 

if user select metric id filter as 1 in the filter it have to Million value , if user select metric id as 2  ehn it shd be in % 

Labels (1)
4 Replies
jaygarcia
New Contributor III

Re: Num Format

I think your expression has an extra bracket ')' after [Gross Sales].  Remove it and the expression will be evaluated OK:

Try:

if(MetricId=1,
(sum([Gross Sales]/1000000)&'M',if(MetricId=2,num((sum(Units)/sum([Target Units])),'#.##%')))

Best regards,

Jay

manoranjan_321988
New Contributor

Re: Num Format

Hi Tried,

 

Nothing is helping , facing again same issue.

 

Highlighted
manoranjan_321988
New Contributor

Re: Num Format

Hi jay,

 

as per your suggestion rectified  the brackets but not working pls help

manoranjan_321988
New Contributor

Re: Num Format

is this achievable , pls suggest expertise