Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
bronsonelliott
Partner
Partner

How do I make the Y-axis format dynamic

I have an app where I have a list of metrics.  Some of the metrics are expressed as absolute values while others are expressed as percentages. 

I have my Actual format as such

=if([Metric Format] = 'Percent',

num(sum(Actual),'#,##0.0%'),

num(sum(Actual),'#,##0'))

And everything displays on the graph correctly except that the y-axis is not being properly formatted.  How can I make the y-axis display correctly as '#,##0' or '#,##0.0%' list the actual value that's being displayed?

1 Solution

Accepted Solutions
rwunderlich

It may work if you move the if() to select just the format, not the aggregation.

num(sum(Actual)

,if([Metric Format] = 'Percent','#,##0.0%','#,##0'))

However, I find it easier to make two separate expressions and use the Expression conditional property to choose between them. That allows for use of the Number format, Axes, etc per expression.

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

2 Replies
rwunderlich

It may work if you move the if() to select just the format, not the aggregation.

num(sum(Actual)

,if([Metric Format] = 'Percent','#,##0.0%','#,##0'))

However, I find it easier to make two separate expressions and use the Expression conditional property to choose between them. That allows for use of the Number format, Axes, etc per expression.

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

bronsonelliott
Partner
Partner
Author

Thanks Rob!  Your second suggestion of making separate expressions plus the conditional property is exactly what I need.