Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
This is my first help request. I used to work with MS Power BI and pretty much known DAX formulas.
But new to Qlik and hard for me at this stage. Can some one help me, please?
Current Year Sales:
Sum({<Year={"$(=Max(Year))"}>}TOTAL SalesAmount)
LastYearSales:
Sum({<Year={"$(=Max(Year)-1)"}>}TOTAL SalesAmount)
I created a pivot table and the Store name and week Number were added to dimensions and Channel and Value as Measures. On the right-hand side of pivotable, there is 3p, App, Web, etc and under that channel Sales Amount and Lastyersales are plotted.
How can I check the current year's and last year's sales side by side for all channels? And also the growth.
Your support will be highly appreciated.
Can you share your data?? with expected output. Also, tell us where you want to achieve it. in front end or in back end??
Thank you so much. That was my misunderstanding and that measure worked me perfectly.
I made a mistake with Sum({<Year={"$(=Max(Year))"}>}TOTAL SalesAmount). I removed the total.
Thanks fr your help
No need to use TOTAL in set analysis and nullify Year filter, try like
Current Year Sales:
Sum({<Year={"$(=Max(Year))"}>} SalesAmount)
LastYearSales:
Sum({<Year={"$(=Max(Year)-1)"},Year=>} SalesAmount)
Regards,
Prashant Sangle
Dear Prashant,
Thank you so much for the prompt support.
I have attached the result. I have dates, Sales Amounts, Current year Sales, and Previous Year Sales in columns.
In the year 2022 Current Year Sales:
Sum({<Year={"$(=Max(Year))"}>} SalesAmount) shows me the 0 value and 2023 as the correct value.
But in 2023 LastYearSales:
Sum({<Year={"$(=Max(Year)-1)"}, Year=>} SalesAmount) shows me the correct value for 2022 but the same value for 2023 as of the current year. I suppose it should be 0.
Any thoughts please?
Can you share your data?? with expected output. Also, tell us where you want to achieve it. in front end or in back end??
Thank you so much. That was my misunderstanding and that measure worked me perfectly.
I made a mistake with Sum({<Year={"$(=Max(Year))"}>}TOTAL SalesAmount). I removed the total.
Thanks fr your help