Forum Discussion

Akbarov's avatar
Akbarov
Helper I
4 years ago
Solved

SUMIF >= column1 AND <= column2

Hello,

 

I am trying to use following SUMIF formula for DAX measure:

 

=SUMIFS('(Table 1) Month'!G:G,
'(Table 1) Month'!A:A,Output!K17,
'(Table 1) Month'!B:B,Output!L17,
'(Table 1) Month'!C:C,">="&Output!M17,
'(Table 1) Month'!C:C,"<="&Output!N17)

 

DAX measure I am currently using is:

Period1 =
sumx(filter(allselected('(Table 1) Month'),
'(Table 1) Month'[Client] = [Client] &&
'(Table 1) Month'[Policy Year] = [Policy Year] &&
'(Table 1) Month'[Month] >=SELECTEDVALUE('Start Date'[Month From]) &&
'(Table 1) Month'[Month] <=SELECTEDVALUE('End Date'[Month To])),
'(Table 1) Month'[Days of Month])
 
But result is not correct...
 
Table1 and Table4 are related.
Table End and Start are offline tables ( not connected to any table, I use them just for filtering )

10 Replies