Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I trying to create a table in Qlik sense so that when you select a month it show the select month sales and pervious month sale and variance for each manufacturer. The only part that not working is the pervious month sales (Jan - 2023). I would appreciate any help with this problem.
Attach is the table with the set expression that I have used.
FYI - I thought it could be my date formatting, but I ruled that out after a lot analysis.
Set Expression | [Global Manufacturer] | SUM({<[Calendar Year/Month]={$(=AddMonths(date#('$(vMonthSelect),-1')))}>} [Sales in Units]) | SUM({<Month={'$(vMonthSelect)'}>} [Sales in Units]) | SUM({<Month={'$(vMonthSelect)'}>} [Sales in Units])-SUM({<[Calendar Year/Month]={$(=AddMonths(date#('$(vMonthSelect),-1')))}>} [Sales in Units]) |
Global Manufacturer | Jan-2023 | Feb-23 | Variance from Prior Month | |
A | 0 | 40,539,232 | 40,539,232 | |
B | 0 | 27,008,603 | 27,008,603 | |
C | 0 | 23,578,479 | 23,578,479 | |
D | 0 | 21,628,491 | 21,628,491 | |
E | 0 | 17,721,264 | 17,721,264 | |
F | 0 | 17,333,169 | 17,333,169 |
I'm using Qlik sense for this for this table. I tired your code and its still the same outcome for pervious month.
I'm using Qlik sense for this for this table. I tired your code and its still the same outcome for pervious month.