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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
drohm002
Creator II
Creator II

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

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

Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

marksouzacosta

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
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

marksouzacosta

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
Follow me on my LinkedIn | Know IPC Global at ipc-global.com

drohm002
Creator II
Creator II
Author

this worked! thank you Lisa!