cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kkanda
Resolver I
Resolver I

Calculate SUM with two slicers

Hello All,

I am trying to find a solution for the following problem involving a some tables and multiple slicers. To simplify, I have the following table:

GroupReadDateMeterReading
A201801234
B201801342
C201801432
D201801198
A201802761
B201802209
C201802219
D201802356

 

Both Group and ReadDate are in Text format. I have two slicers based on other related tables for Group and ReadDate. I can get the Group from multiple selection of one slicer - in the format A,C,D or A|C|D by the CONCATENEX function.

VAR Group_Selected = CONCATENATEX( VALUES(Table X[Group]),[Group],"|"). By changing the delimiter to "," I can get the result as A,C,D.

I got the selected value of ReadDate (single value) as a measure again from another Table Y. I created the relationship between all the Tables. Where the relationship is Many to Many, I created separate tables listing single values and relating this table to other tables creating One to Many relationship.

Now I want to apply both these measures as Filters on the above Table to get the SUM of MeterReadings.

I am not able to figure out how to apply multiple values of Group_Selected on the above Table to get a filtered table and then apply the Filter for the ReadDate on that table to get the SUM. I found that a post in the Forum  suggested PATHCONTAINS function, but that is not working for me. 

Please help me in suggesting a solution. Since I am not very proficient in Power BI, it will be helpful in explaining the various steps involved - probably create a table with one Filter, save as VAR table and then apply the second Filter to get the SUM.

Thanking you in advance.

 

 

1 REPLY 1
Pragati11
Super User
Super User

Hi @kkanda ,

 

Can you please share a screesnhot on your data model and the relationships you have created?

 

Thanks,

Pragati


My Blog: Data Vibe
Connect: LinkedIn
Connect: Twitter






If this helps, Appreciate a KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors