Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I want to display monthly analysis in bar chart where every month shows last 12months of sales. Want to create last 12months field for every month in backend .
example : Jan 2023,Feb 2023,March 2023,April 2023 these are my month dimension values in bar chart
Jan 2023 means it has to show Feb 2022 to Jan 2023 sales sum
Feb 2023 means it has to show March 2022 to Feb 2023 sales sum
March 2023 means it has to show April 2022 to March 2023 sales sum
April 2023 means it has to show May 2022 to April 2023 sales sum
like that I want to show in bar chart.
Please anyone help me to resolve this it is an urgent requirement in my project delivery.
Regards,
Anusha
Hi, add this line within the Master Calendar to create a flag.
If(DateField <= Today() And DateField >= AddYears(Today(), -1), 1, 0) as Last12Months
With this as the sales expression.
=Sum({<Last12Months={1}>} Sales)
@BrunPierre thanks for your response but today function won't workout for my scenario.If we use today means it always takes current month but my scenario is it has to take individual month previous month to last 12 months .so, every month has different prev month.
Did u get the answer ?
You should implement an appropriate The As-Of Table - Qlik Community - 1466130 which linked each period with the previous 12 periods and is then used as dimension in your object.