Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
drohm002
Creator
Creator

Chart to display only year to date

Hello, please see my chart and expression below.  For the 'YTD' line on the graph I dont want it to go down to the x-axis and show all those 0's.  I want the YTD line to just stop at its most current point/most current month, instead of shooting downwards.  How would i get this to work?  Thank you!

=COUNT({<[Exam Status] -= {'X'}, _Scheduled_CurYTDFlag = {'1'}, [WH Exam Type] -={""}, [Scheduled Month Year]-={'$(vCurrentMonth)'}>} DISTINCT [Accession Number])

 

drohm002_0-1720012168946.png

 

1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

Use this expression as the measure:

If(COUNT({<[Exam Status] -= {'X'}, _Scheduled_CurYTDFlag = {'1'}, [WH Exam Type] -={""}, [Scheduled Month Year]-={'$(vCurrentMonth)'}>} DISTINCT [Accession Number]) >0, COUNT({<[Exam Status] -= {'X'}, _Scheduled_CurYTDFlag = {'1'}, [WH Exam Type] -={""}, [Scheduled Month Year]-={'$(vCurrentMonth)'}>} DISTINCT [Accession Number]), null())

View solution in original post

6 Replies
Lisa_P
Employee
Employee

Use this expression as the measure:

If(COUNT({<[Exam Status] -= {'X'}, _Scheduled_CurYTDFlag = {'1'}, [WH Exam Type] -={""}, [Scheduled Month Year]-={'$(vCurrentMonth)'}>} DISTINCT [Accession Number]) >0, COUNT({<[Exam Status] -= {'X'}, _Scheduled_CurYTDFlag = {'1'}, [WH Exam Type] -={""}, [Scheduled Month Year]-={'$(vCurrentMonth)'}>} DISTINCT [Accession Number]), null())

anat
Master
Master

Try by checking suppress zero values option

marksouzacosta
Partner - Specialist
Partner - Specialist

I tried that on my tests, but it did not work as expected for line charts!

Read more at Data Voyagers - datavoyagers.net
marksouzacosta
Partner - Specialist
Partner - Specialist

This looks better but does not solve the problem too. It still displays a flat line without any value:

marksouzacosta_0-1720065162541.png

 

Read more at Data Voyagers - datavoyagers.net
marksouzacosta
Partner - Specialist
Partner - Specialist

I think I got it. You have to use @Lisa_P expression but check this property in your chart:

marksouzacosta_1-1720065288526.png

 

Regards,

Mark Costa

Read more at Data Voyagers - datavoyagers.net
drohm002
Creator
Creator
Author

this worked! thank you Lisa!