Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Noor51
Contributor III
Contributor III

Table that shows Select Month Variance- NOT WORKING

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.

Noor51_0-1696443412621.png

 

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
Labels (4)
1 Solution

Accepted Solutions
Noor51
Contributor III
Contributor III
Author

I'm using Qlik sense for this for this table. I tired your code and its still the same outcome for pervious month. 

 

Noor51_0-1696443336225.png

Noor51_1-1696443365239.png

 

 

 

View solution in original post

1 Reply
Noor51
Contributor III
Contributor III
Author

I'm using Qlik sense for this for this table. I tired your code and its still the same outcome for pervious month. 

 

Noor51_0-1696443336225.png

Noor51_1-1696443365239.png