Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Mark18
Contributor II
Contributor II

Bar chart between two months

Hi guys,

I have two variables vFrom and vTo.

Which will be set based on user selection from a drop down. The variables holds the MonthName value eg.Feb 2017.

How can i plot a barchart between the From and To month.

Im using expression linke this in the dimension:

If(monthYear> $(vFrom) and monthYear<$(vTo), monthYear)

But it is not working. monthYear is the column from the table which is also a MonthName field.

 

1 Reply
Dalton_Ruer
Support
Support

The expression editor will show you how it is evaluating your expression at the bottom of the screen. It will say OK when it's good to go, or will show errors. Typically for things like dates you might need to wrap them with single quotes so they come out look like they need division done

If(monthYear > 12/5/2021  

Of it might show 0 or something because the value is jacked up. 

If you wrap '$(vFrom)' it will add the single quotes around the value so the bottom of the screen should show

If(monthYear > '12/5/2021'