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

Sum when the year month of the data is equal to the year month of the master calendar used as dimension.

Hi community!

I have a problem that I have not been able to find the correct expression for several days.

I have on one side a table of amounts data with date and a concept code, another table where the concept code has another field that can be C or D and the calendar master.

I am using a bar chart where the X dimension is the year month of the calendar master and the measure is where I have the problem, I have tried both SUF(IF..) and set analysis without achieving the goal.

Simplifying the tables..

Amount Table:
MCACustomer | MCA_YearMonth | Code | MCAValue |...
1 | 2019-Jan | 30 | 100 |...
1 | 2019-Jan | 35 | 100 |...
1 | 2019-Feb | 30 | 100 |...
1 | 2019-Feb | 40 | 100 |...

Concept Table:
Code | Type |...
30 | C |...
35 | C |...
40 | D |...

MasterCalendar:
YearMonth |...
2019-Jan |...
2019-Feb |...

Some expressions that I tried without success:

SUM({<[Code] = {'C'}, MCA_YearMonth = {'$(=Only(YearMonth))'} >} MCAValue)
SUM(IF([Code] = 'C' AND MCA_YearMonth = YearMonth,MCAValue,0))


Thanks in advance to anyone who can give me some light on this problem!

 

Qlik Sense Business 

0 Replies