Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Static Min and Static Max for year

I have created a gantt chart out of a bar chart with the field Vendor as the dimension (Y-axis)and 6 stacked expressions representing the date as  (x-axis)

Currently it show all years (2017, 2018, 2019, 2020). I want it to display 2018 and 2019 only and am unable to do so. Please help. Thanks

4 Replies
Digvijay_Singh

If you have Year field in your data model, you can use set expressions in your measure, like this may be -

Sum({<Year={2018,2019}>}Value)

Or

Sum(YourDateField={">=$(=Makedate(2018,01,01))"}Value)

Chanty4u
MVP
MVP

you can try this too

refer the link for more info

Sum({<Year-={2017,2020}>}Value)

https://community.qlik.com/servlet/JiveServlet/showImage/38-4424-102433/Formula1.png

Anonymous
Not applicable
Author

I tried your approach, it did not work. the thing is, my chart has 1 dim but 7 expressions to generate the gantt chart look in the form of a stacked bar chart. the Year field is generated by a link table linking the various dates to the link table. I will post my solution should I find it. Thanks for your input

Anonymous
Not applicable
Author

I tried your approach, it did not work. the thing is, my chart has 1 dim but 7 expressions to generate the gantt chart look in the form of a stacked bar chart. the Year field is generated by a link table linking the various dates to the link table. I will post my solution should I find it. Thanks for your input