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.