Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Himanshi0291
Helper II
Helper II

SUM with FILTER IN does not populate value of third variable

Hi guys,

 

I'm experiencing a peculiar problem with SUM with FILTER IN function in which it's not adding value of third value in any fashion used. My query is - 

Administration Hours = CALCULATE(SUM(DK_Time_Temp[RegHrs]), FILTER('DK_Projects','DK_Projects'[Name] IN {"Administration","CH Administration","Administration HK"}))
 
but in this, I get SUM of only 2 variables i.e. 'Administration' & 'CH Administration' and it does not value of third variable 'Administration HK'. 
 
Can you please help? 
1 ACCEPTED SOLUTION
harshnathani
Community Champion
Community Champion

Hi @Himanshi0291 ,

 

 

Try Troubleshooting.

 

1.In Power Query Trim the column. Maybe a leading space is causing this issue.

2. Try using  || .  Administration Hours = CALCULATE(SUM(DK_Time_Temp[RegHrs]), FILTER('DK_Projects','DK_Projects'[Name] = "Administration"|| 'DK_Projects'[Name]= "CH Administration"|| 'DK_Projects'[Name] = "Administration HK"))

 

Try solving for each one separately and see the results.

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi , @Himanshi0291 

Could you please tell me whether your problem has been solved?
If it is,  please mark the helpful replies or add your reply as Answered to close this thread.
More people will learn new things here. If you haven't, please feel free to ask.

Best Regards,
Community Support Team _ Eason

 

v-easonf-msft
Community Support
Community Support

Hi , @Himanshi0291 

There are no errors in the syntax of the formula.

Please make sure that your third variable'Administration HK' isn't misspelled.

 

In addition ,please check  whether  the data has  been filtered by other filters in advance.

 

Best Regards,
Community Support Team _ Eason

harshnathani
Community Champion
Community Champion

Hi @Himanshi0291 ,

 

 

Try Troubleshooting.

 

1.In Power Query Trim the column. Maybe a leading space is causing this issue.

2. Try using  || .  Administration Hours = CALCULATE(SUM(DK_Time_Temp[RegHrs]), FILTER('DK_Projects','DK_Projects'[Name] = "Administration"|| 'DK_Projects'[Name]= "CH Administration"|| 'DK_Projects'[Name] = "Administration HK"))

 

Try solving for each one separately and see the results.

 

Regards,

Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.