Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
hosasahana
Partner - Contributor III
Partner - Contributor III

How to exclude the month that does not have data in bar chart?

Hi All,

I have a bar chart with month as a dimension and a measure for its calculation. I want to achieve 2 things.

1)how can I exclude the months that do not contain any data? meaning that month's bar should not be seen.

2) for months that has data but does not satisfy the condition should show an "NA" in the chart .

Can this be achieved in script level?

 

Regards,

Sahana

hosasahana_0-1612174081328.png

 

4 Replies
Taoufiq_Zarra

@hosasahana  if I understood correctly you need to uncheck :

Taoufiq_Zarra_0-1612175277908.png

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

Hi Taoufiq,

Thanks for responding..

This solution will help me to resolve for zero values, will this also help for my 2nd query?2) for months that has data but does not satisfy the condition should show an "NA" in the chart .how can I achieve this?

 

Regards,

Sahana

Taoufiq_Zarra

@hosasahana  For 2 No

can you give more detail about condition and a sample data and the expected output ?

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
hosasahana
Partner - Contributor III
Partner - Contributor III
Author

hi, sorry I cannot share the data as I am using many calculated measures. I shall try to explain as below:

I am concatenating data from multiple tables into a model table with few fields and keys.

later I will use only the model  and a master excel with ID's joining with model for my UI.

so here there is a bar chart which shows me data for 2020 all months. 

issue:

1)I want the bars to be shows only for the months' that have data >0 . (I want to do a avg in another chart using only the months that has data and exclude the zero months)

2)if data is present but does not satisfy the where clause in script, the bar should show up but can show NA. 

can this be possible in script level wile loading  ? 

my month field can be restricted?