Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
adurgani
Contributor III
Contributor III

Set analysis - Not returning desired result

This is my formula:

Sum({$<Dimension={'Actual'},[Month]={'January','February'}>}[Line Amount]) + Sum({$<Dimension={'April Forecast'},[Month]={'March','April','May','June','July','August','September','October','November','December'}>}[Line Amount])

When I use the month listbox and filter to January I still get the full amount and it doesn't show me just January. How shall I amend the formula to get the desired result?

13 Replies
adurgani
Contributor III
Contributor III
Author

If we drop the CrossTab table, doesn't the data disappear?

vishsaggi
Champion III
Champion III

No I am loading that cross table data into Final table which you can see below the NoConcatenate keyword. So Final table holds the data and Actual table will get concatenated to this Final table.

swuehl
MVP
MVP

Try using the intersection operator *= :

Sum({$<Dimension={'Actual'},[Month] *= {'January','February'}>}[Line Amount]) + Sum({$<Dimension={'April Forecast'},[Month] *= {'March','April','May','June','July','August','September','October','November','December'}>}[Line Amount])


or whatever is appropriate for your requirements.

adurgani
Contributor III
Contributor III
Author

This is perfect and it worked!!! Thanks much Stefan for the answer and Vishwarath for bringing me along to ask the right questions!! !