Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alfredlee
Contributor III
Contributor III

Compare Sales Differences between 2 dynamically selected sets

I have a simple table:

ABFYYYYMMCustCodeItemCodeSalesPM
Actual20124C01X0110020
Actual20125C01X0110020
Actual20126C01X0110020
Actual20126C02X0120045
Actual20126C02X02300100
Budget20124C01X0110020
Budget20125C01X019018
Budget20126C01X018016
Budget20126C02X0110020
Budget20126C02X02500200

I want to compare two columns dynamically, e.g. Actual vs Budget for 2012, Actual Apr vs Actual May, etc

I have tried hard coding the expressions:

  • Sum({$<ABF={'Actual'}>} Sales)
  • Sum({$<ABF={'Budget'}>} Sales)
  • Sum({$<ABF={'Actual'}>} Sales) - Sum({$<ABF={'Budget'}>} Sales)

They worked fine to show me the difference between Actual and Budget, and I know same will apply for Year and Month.

What I want now is to extend this so that I can have 2 list boxes of ABF, and and pick the 1st one as left hand side, the 2nd one as right hand side, and the pivot chart can display the 3 columns accordingly. I need some enlightenment as it just sounds like an easy piece of homework on set analysis. Any help would be appreciated.

Regards,

Alfred

1 Solution

Accepted Solutions
Anonymous
Not applicable

This should be an easy exercise if you are using QlikView 11.  The new feature "alternate states" will allow you to set up comparitive data sets that will allow you to do side by side comparisons. 

View solution in original post

3 Replies
Anonymous
Not applicable

This should be an easy exercise if you are using QlikView 11.  The new feature "alternate states" will allow you to set up comparitive data sets that will allow you to do side by side comparisons. 

alfredlee
Contributor III
Contributor III
Author

Cool, it works fine! Thanks! Seems I am just lucky to have v11 with me.

Only some minor issue, there is a red syntax warning below the last closing curly. The pivot chart is working fine though, just this red mark I am puzzled.

Image4.PNG

alfredlee
Contributor III
Contributor III
Author

One more thing, the Show Partial Sum is not following the other filters...

This is the actual expression:

Sum({[GroupLeft] <ABF=GroupABFLeft, YYYY=GroupYYYYLeft, MM=GroupMMLeft>} Sales * ExRate) / SymbolValue

Thanks!