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: 
PoojaS
Contributor II
Contributor II

Showing extra 0 values in the line chart even though there is no 0 in the source

HI, 

I attached the source data and I dont have any values or 0 in the source for the year 2023. but when i use the line chart, I can see that value 0 is populated for the year 2023 and for the months mar till dec. 
so I dont want to populate 0 in the line chart if it is not available in source, if 0 exists in the source then only i want to populate it in the line chart. Please help me to solve this issue.
Dimension used is : MasterMonth
Measure used is : 1 )  2022: sum({<MasterYear = {"2022"}>}distinct NumOFPolicies)
                             2 )  2023: sum({<MasterYear = {"2023"}>}distinct NumOFPolicies)

PoojaS_0-1715565967519.png

PoojaS_1-1715566012318.png

Labels (7)
5 Replies
Lisa_P
Employee
Employee

You could also do this using one measure and two dimensions (MasterMonth, MasterYear). 

If you wanted to stick to your original, you could use this expression:

 IF(sum({<MasterYear = {"2022"}>}distinct NumOFPolicies)>0, sum({<MasterYear = {"2022"}>}distinct NumOFPolicies), null())

PoojaS
Contributor II
Contributor II
Author

Hi, its not working as expected, for reference , i will provide another example.

Hi,

I attached the data which i used and also i have attached the table screenshot.
for the company C , we dont have any data. but in the table we can see 0 as a value.
so i dont wnat to show the 0 for the company C. i want to show 0 only for B as it has the values 0 for sales.
Could you please help me with the solutions.

PoojaS_0-1715778767722.png

PoojaS_1-1715778876140.png

 

 

PoojaS
Contributor II
Contributor II
Author

Hi,

I attached the data which i used and also i have attached the table screenshot.
for the company C , we dont have any data. but in the table we can see 0 as a value.
so i dont wnat to show the 0 for the company C. i want to show 0 only for B as it has the values 0 for sales.
Could you please help me with the solutions.

PoojaS_0-1715778767722.png

PoojaS_1-1715778876140.png

 

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this: https://community.qlik.com/t5/New-to-Qlik-Analytics/Display-0-in-a-table-only-when-it-comes-from-the...

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
SunilChauhan
Champion II
Champion II

there should be somewhere  continuous Axis option tick for 2023. untick or change to other available  option. for only 2023

 

Sunil Chauhan