Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
orangebloss
Creator
Creator

Combo charts : Hiding dimension value when measure not calculated

In my combo chart the measures only calculate if there are any late values (shown in red below) using the format :

if(Sum({<SevenDayTaskCompletionTimeStatus = {"Overdue","Late to Milestone"},TaskName-={TaskName1}>} EstimateHours)/

Sum(EstimateHours)>0,
Sum({<SevenDayTaskCompletionTimeStatus = {"Overdue","Late to Milestone"},TaskName-={TaskName1}>} EstimateHours)/

Sum(EstimateHours))

and substituting the measure to be calculated with the other status (e.g. Complete). I'd like to hide any of the dimension values where the calculation is not performed and leaves a blank space. Currently my dimension is created using the following :

if(ProjectId='556802'and TaskListId<>'2206984' and TaskProjectType='CME',


TaskName1)

 

I've tried calculating if the count or sum of the SevenDayTaskCompletionTimeStatus >0 and adding that to the dimension but this doesn't work. The data is built using the hierarchy function - TaskName1 is the task displayed on the bottom of the chart and the calculations are done on everything that is not TaskName1 (i.e. everything below it).

 

Help appreciated!

 

 

orangebloss_0-1744206459724.png

 

Labels (4)
1 Reply
nevopotokcloudinary

 

Hi — this issue of hiding dimension values when the calculated measure is blank (in a combo chart) is a common pain.

Here’s what we did as a workaround:
• Create your dimension expression like:

 

 
if( Aggr( Sum({…} EstimateHours)/Sum(EstimateHours), TaskName1 )>0, TaskName1)
 

— so only include the dimension value when the measure calculation yields something.
• Then in the “Add-ons → Data handling” properties of the chart, uncheck “Include zero values” (or null/blank) so that those dimension values which evaluate to null are not shown. Qlik Community+3Qlik Community+3Qlik Community+3

It’s not perfect (performance may suffer with deep Aggr()s) but it usually hides the “empty” bars/lines until the real data shows up.