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: 
kiranb13
Contributor III
Contributor III

Need show zero values on the bar chart x-axis

Hi All,

I need to create a bar chart.

Below is my requirement. I need show last 3 months data in bar chart irrespective of the date selection. 

For example : Current month is Aug 2022, i need to show the chart for May, June and July 2022. In the database i do have vaules for July month. I created Master calender to acheive May2022 and June 2022. But even though i had written set analysis expression to get three months data i unable to filter the data with set analysis. If i uncheck "show 0 values" i will be able to see only July month data. Can anyone help me here ?

kiranb13_0-1661093832983.png

I have tried the below expression:

if(GetSelectedCount(Participant)=1,
(SUM({<CUST_Month={">=$(=Date(addmonths(Max(today()),-3),'MMM-YY'))<=$(=Date(Max(today()),'MMM-YY'))"},FromDate=,ToDate=>}[CUST_NO_OF_ENROLLMENT])),0)

also i tried with adding sum({1}0) as well.

Labels (1)
2 Replies
sidhiq91
Specialist II
Specialist II

@kiranb13  Could you please share some sample data? It would help us to resolve the issue.

kiranb13
Contributor III
Contributor III
Author

I have tried with the below expression :

if(GetSelectedCount(Participant)=1,
(SUM({<CUST_Month={">=$(=Date(addmonths(Max(today()),-3),'MMM-YY'))<=$(=Date(Max(today()),'MMM-YY'))"},FromDate=,ToDate=>}[CUST_NO_OF_ENROLLMENT])),0)

also i tried with adding sum({1}0) as well.