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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
MG82
Contributor II
Contributor II

Static x-Axis Dimension

Hi,
i want to create a Table or BarChart with a static Dimension that represent the last 6 Months as MonthsYear and the measure should count all Tickets that we recieved in that time period per month. If for one month we hadn't recievied a ticket, the value 0 should be show. I tried this Formular and it works, but when I set an external Filter, like Region or Team, it doesn't. I deactivated all Suppresses Zero Values, but it also not work.

Has anyone an Idea ?

Dimension
=IF([Buchungsdatum_TTWos]>=Monthstart(AddMonths(Date('07.04.2021','dd.MM.yyyy'),-6)),MonthYear.autoCalendar.YearMonth,'<='&MonthName(AddMonths(Date('07.04.2021','dd.MM.yyyy'),-7)))

 

Measure
=IF(isnull(Sum(aggr(Count({<[TWOS_Data.Status]=-{'Closed'}>}[TWOS_Data.Status]),[EmpfängerBereich]))),'0',Sum(aggr(Count({<[TWOS_Data.Status]=-{'Closed'}>}[TWOS_Data.Status]),[EmpfängerBereich])))

 

1 Reply
Dalton_Ruer
Support
Support

If you haven't already added a field in your load script for the MONTH start by doing that. Be sure to lookup DUAL so that April 2021 is assigned a numeric value as well as that text so that it appears in the correct order. 

You could also, if you want, establish a set of FLAGS as fields. Like "Current Month", "Previous Month", "Current Year to Date", "Previous Year To Date", "Current rolling 6 months" etc. Search for examples of Master Calendars to find those types of things. 

After that you should be able to just use your new field as the Dimension, and simply tell the bar to be limited to just 6 months. 

Last6.png