Qlik Community

Qlik Sense App Development

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

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
pradnyat
Contributor

Issue with number formatting in Line chart

Hi All,

We have 2 measures (Sales, Share) which we are showing dynamically in line chart. These 2 measures have different number formatting which I am handling using below expression:

if(Metric='Share',Num(Share,'#0%'),Num(Sales,'##,#00'))

and changed the number formatting to ;Measure Expression' which is giving correct results in Tooltip like % for Share and Number for sales.

But the Y axis remains same its not changing based on metrics. For share as well its showing number.

Any inputs to solve this issue.

Thanks in advance!

7 Replies
Partner
Partner

Re: Issue with number formatting in Line chart

you can achieve it by alternate measures only.
with single expression it was not possible to show 2 different scales for Y axis.

Partner
Partner

Re: Issue with number formatting in Line chart

Hi,

Correct me if I'm wrong, but it looks like you are trying to drive what is displayed on the line chart by toggling in the field. If you do so, than I'd recommend the following approach:

Create or update your Measures table

[Measures]:

LOAD Metric, MetricFormula, Replace(MetricNumFormat,'.', ',') AS MetricNumFormat INLINE [

Metric, MetricFormula, MetricNumFormat

Share, Sum(Share),#.##0%

Sales, Sum(Sales),#.##0

];

Than use the following Expression

NUM($(=MetricFormula),$(=MetricNumFormat))

 

Note: I'm not sure why you don't have an aggregation function for your expression, but it usually required. That's why I've added SUM(). Replace it according to your needs

Regards,
Sergey
pradnyat
Contributor

Re: Issue with number formatting in Line chart

Yes I tried that but its not changing the values displayed at Y Axis
Partner
Partner

Re: Issue with number formatting in Line chart

Usually it changes Y axis

It would be great if you can post the screenshot.

 

Regards,
Sergey
Partner
Partner

Re: Issue with number formatting in Line chart

Hi

Maybe is not selected automatic format number in measure setting?

pradnyat
Contributor

Re: Issue with number formatting in Line chart

Attaching the QVF file for reference. Y axis is still not showing the % values, with measure expression in number format I was able to achieve hover number format.

 

Any help will be really appreciated!

Thanks!

pradnyat
Contributor

Re: Issue with number formatting in Line chart

I have shared the QVF file