Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
Please help me create a graph like this in Qliksense. I want the user to select the month in the filter. Eg. If Nov 2025 is selected.. it should show data from year start to month selected. Jan- Oct 2025. And a partition like line and the month selected from previous year and current year.
Thanks
PA
You can do something like this by using dimension reference line and set analysis.
If you have a master calendar you can add these dimensions:
Date(monthstart(TempDate),'MMM-YYYY') as MonthYear,
Date(monthstart(AddYears(TempDate,-1)),'MMM-YYYY') as LastMonthYear,
Date(YearStart(TempDate),'MMM-YYYY') as YearStartMonth,for the expression you can do something like this:
Sum({<MonthYear={">=$(=YearStartMonth)<=$(=GetFieldSelections(MonthYear))"}>+<MonthYear={"$(=LastMonthYear)"}>} Expression1)you can see that we added the previous year's same month with:
+<MonthYear={"$(=LastMonthYear)"}for the sorting, use sort by expression on MonthYear and write this:
Match(Only({1} MonthYear),'$(=MonthYear)', '$(=LastMonthYear)', MonthYear)for the coloring, I used this:
If(Max({1} CalendarDate)>YearStart(Today()),Blue(),Green())and finally for the dimension reference line, you can use the following:
=MonthStart(Max({<MonthYear={"<=$(=GetFieldSelections(MonthYear))"}>} CalendarDate))If you cant see anything, try selecting a "MonthYear" first.
Hope this works for you.
You can do something like this by using dimension reference line and set analysis.
If you have a master calendar you can add these dimensions:
Date(monthstart(TempDate),'MMM-YYYY') as MonthYear,
Date(monthstart(AddYears(TempDate,-1)),'MMM-YYYY') as LastMonthYear,
Date(YearStart(TempDate),'MMM-YYYY') as YearStartMonth,for the expression you can do something like this:
Sum({<MonthYear={">=$(=YearStartMonth)<=$(=GetFieldSelections(MonthYear))"}>+<MonthYear={"$(=LastMonthYear)"}>} Expression1)you can see that we added the previous year's same month with:
+<MonthYear={"$(=LastMonthYear)"}for the sorting, use sort by expression on MonthYear and write this:
Match(Only({1} MonthYear),'$(=MonthYear)', '$(=LastMonthYear)', MonthYear)for the coloring, I used this:
If(Max({1} CalendarDate)>YearStart(Today()),Blue(),Green())and finally for the dimension reference line, you can use the following:
=MonthStart(Max({<MonthYear={"<=$(=GetFieldSelections(MonthYear))"}>} CalendarDate))If you cant see anything, try selecting a "MonthYear" first.
Hope this works for you.
@BIAKS This was perfect, Thank you so much. Would it be possible to show Nov 2024 first and then Nov 2025?
You can change dimension reference line formula to this:
=MonthStart(Max({<MonthYear={"<=$(=Date(AddYears(Date#(GetFieldSelections(MonthYear),'MMM-YYYY'),-1),'MMM-YYYY'))"}>} CalendarDate))And Sorting of the MonthYear to this:
Match(Only({1} MonthYear), '$(=LastMonthYear)', '$(=MonthYear)', MonthYear)But this will show the selected value as last year's MonthYear, so you can hide the value for not to get confused.