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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Supress leading zero/null values in bar chart

Hi

I am trying to create a bar chart with a monthly view. My table has dates, values and categories. I want to suppress leading zero/null values but keep zeros in between the first non zero value and last in bar chart. For example, if a person selects two categories, one that has values for Jan, Feb, and March 2015, and the other that has values from Aug, Sep Oct 2015, I want to show all months from Jan to Oct 2015.

I created a Date table for all dates, but the issue is the table has all dates from Jan 2000. If I do show all values, it shows me all dates, if i do suppress at null, it removes the middle dates.  Is there a way to keep the middle dates and remove the dates before the earliest date in the selected categories, and the last date in the selected categories?

Thanks!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Is this not what you want?

No selections:

2016-06-17 20_11_00-QlikView x64 - [C__Users_Stefan_Downloads_temp (2).qvw_].png

Feb to August selected:

2016-06-17 20_11_16-QlikView x64 - [C__Users_Stefan_Downloads_temp (2).qvw_].png

Notice Apr and Jun are shown, but show no bars.

View solution in original post

4 Replies
swuehl
MVP
MVP

Maybe you can do it using set analysis, using something like

=Sum(Value)+Sum({<Date = {">=$(=Min(Date))<=$(=Max(Date))"},Category>}0)

2016-06-15 23_48_45-4918151_Immorendite_09_15_Feldberg  [Kompatibilitätsmodus] - Excel.png

Anonymous
Not applicable
Author

Hi Swuehi

I was able to recreate my issue as a temp qvw file (attached). The problem is I am putting the Category as a second dimension because i want to show it as separate bars. When its not in the dimension, your way works. Is there a way to add the category in the dimension and still have the same results?

Thanks!

swuehl
MVP
MVP

Is this not what you want?

No selections:

2016-06-17 20_11_00-QlikView x64 - [C__Users_Stefan_Downloads_temp (2).qvw_].png

Feb to August selected:

2016-06-17 20_11_16-QlikView x64 - [C__Users_Stefan_Downloads_temp (2).qvw_].png

Notice Apr and Jun are shown, but show no bars.

Anonymous
Not applicable
Author

Yes, this is what i was looking for. Is there a way to hide the null in the legend. when i select Suppress When Value is Null for Category, it hides the dates. And when i select one category, it still shows two other categories in the legend.