Forum Discussion

cfahner's avatar
cfahner
Frequent Visitor
2 years ago
Solved

SumX Filter with multiple selected slicer values

I currently have it working where if one Week Ending Date is selected the measure calculates without issues

Mechanic Cost Breakdown = IF(HASONEFILTER('Electronic Timesheets'[Name]),[Measure 2],SUMX(filter('Time','Time'[Week Ending date ]=SELECTEDVALUE('Week Ending Dates'[WeekEnding])),[Measure 2]))

 

 What I want to do is have the same measure calculate but have the ability to select multiple week ending dates, I have researched some and attempted to do the following but results in an error

test = CONCATENATEX(VALUES('Week Ending Dates'[WeekEnding]),'Week Ending Dates'[WeekEnding],",")

Mechanic Cost Breakdown = 
IF(HASONEFILTER('Electronic Timesheets'[Name]),[Measure 2],SUMX(filter('Time',[test] IN VALUES('Time'[Week Ending date ])),[Measure 2]))

 

 

 

  • cfahner , Try like

     

    Mechanic Cost Breakdown = IF(HASONEFILTER('Electronic Timesheets'[Name]),[Measure 2],SUMX(filter('Time','Time'[Week Ending date ] in values('Week Ending Dates'[WeekEnding])),[Measure 2]))

1 Reply

  • cfahner , Try like

     

    Mechanic Cost Breakdown = IF(HASONEFILTER('Electronic Timesheets'[Name]),[Measure 2],SUMX(filter('Time','Time'[Week Ending date ] in values('Week Ending Dates'[WeekEnding])),[Measure 2]))