Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
tlegit
Contributor II
Contributor II

Outlier month dots in line chart - Dealing with zero values

I have searched the forums for an answer, but was unable to find anything similar to the problem I have.

I have developed quite a few line charts and implemented a way to show an outlier as follows:

tlegit_0-1652818609608.png

This is if a user makes a filter selection for April 2022 - Notice that there are dots for the following Month May-2022. 

Measure 1 (Majority):
if(Count({$<MonthSequence = {">=$(=$(VSelectedReferenceMonth)) <=$(=$(vSelectedReferenceMinus6))"}, CalendarMonthOnly=, CalendarYear=, SOC={1}>} Distinct ClientID)=0,NULL(),
Count({$<MonthSequence = {">=$(=$(VSelectedReferenceMonth)) <=$(=$(vSelectedReferenceMinus6))"}, CalendarMonthOnly=, CalendarYear=, SOC={1}>} Distinct ClientID)))

The way the set analysis works is that if there are any values that are = 0 it sets the value to NULL() otherwise display the value. This handles the additional date so that the line doesn't continue and show 0 for all the previous 6 months.

Measure 2 (Outlier): 
if(Count({$<MonthSequence = {"$(=$(vSelectedReferencePlus1))"}, CalendarMonthOnly=, CalendarYear=, SOC={1}>} Distinct ClientID)=0,NULL(),
Count({$<MonthSequence = {"<=$(=$(VSelectedReferenceMonth)) >=$(=$(vSelectReferencePlus1))"}, CalendarMonthOnly=, CalendarYear=, SOC={1}>} Distinct ClientID)))

This checks if any of the months other than the future month is 0 then it sets the value to null otherwise it displays the value. 

However, there is an issue I'm not sure how to solve. For instances where there are actual zero values for the underlying selection the month is skipped over in the line chart and it looks like this:

tlegit_1-1652819321796.png

 

For instances like this I still need to show the CalendarMonthYear  as well as the value and keep my outliers the way they function now. I am open to any suggestion(s). If there is some way to remove the additional measure as well that would be ideal rather than having an ' ' string the legend. That is just the only way I was able to get it to work in the first place.

 

Labels (5)
1 Reply
tlegit
Contributor II
Contributor II
Author

Does anybody have an idea on this?