Qlik Community

Qlik Sense App Development

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

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
crowegreg
Not applicable

Number format within a Chart

Shown is my set expression within a measure on a chart:

if(vMeasurement = 'Count',

Count({$<MI_Priority = {'Critical','High'},FY_Year = {'$(vFYYear)'}>}[Incident Number]),

Sum({$<MI_Priority = {'Critical','High'},FY_Year = {'$(vFYYear)'}>}[Duration])

)

By the if statement, I will either be displaying a number or a duration. How do I change the formatting of the number within the chart? I've tried using custom, and adding 'Interval' to the part of the expression with the sum of the duration, but I can't get it to work.

19 Replies
mjtaft2017
Not applicable

Re: Number format within a Chart

Can you give a little more information?  What is your dimension?  What does your data look like?  What does your chart look like?

crowegreg
Not applicable

Re: Number format within a Chart

Sample Data:

Incident #, Month, Duration, Priority

INC001, Jan, 05:25,High

INC002, Jan, 00:45,Critical

INC003, Jan, 02:30,High

INC004, Feb, 01:15,High

INC005, Feb, 02:33,High

INC006, Feb, 00:45,High

INC007, Feb, 03:10,High

The dimension for my chart is Month.

If I have a bar chart, based on count of Incident #, chart will show for Jan -3, Feb -4. The format of the measure will be number.

If I have a bar chart, based on sum of Duration, chart will show for Jan - 08:40, Feb -07:43. The format of the measure will be duration.

What I'd like to do is combine these 2 bar charts into 1 chart, using a variable to select either count or duration. But I can't figure out how to change the format of the measure between number and duration. I believe I can use custom, and then properly format the set statement, but I can't get it to work.

antoniotiman
Not applicable

Re: Number format within a Chart

Hi Greg,

see Attachment.

Regards,

Antonio

crowegreg
Not applicable

Re: Number format within a Chart

Hi Antonio,

How do I properly view what you have sent me? I only see the  load statement. I already have the data loaded.

Thanks,

Greg

antoniotiman
Not applicable

Re: Number format within a Chart

You don't see this

mjtaft2017
Not applicable

Re: Number format within a Chart

Antonio - he is using Qlik Sense.  Your app is in Qlik View

antoniotiman
Not applicable

Re: Number format within a Chart

My apologies, I'm sorry.

mjtaft2017
Not applicable

Re: Number format within a Chart

I am trying this but so far not able to get both axis to display -- I put the values on the bars but that isnt what you want.

Maybe try adding as an alternate measure?  I am going to try that

mjtaft2017
Not applicable

Re: Number format within a Chart

I tried adding as alternate measure  then the user can display either way

Count.PNGDuration.PNG