topic Calculate SUM with two slicers in Desktop
https://community.powerbi.com/t5/Desktop/Calculate-SUM-with-two-slicers/m-p/1150472#M522173
<P>Hello All,</P><P>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:</P><TABLE><TBODY><TR><TD>Group</TD><TD>ReadDate</TD><TD>MeterReading</TD></TR><TR><TD>A</TD><TD>201801</TD><TD>234</TD></TR><TR><TD>B</TD><TD>201801</TD><TD>342</TD></TR><TR><TD>C</TD><TD>201801</TD><TD>432</TD></TR><TR><TD>D</TD><TD>201801</TD><TD>198</TD></TR><TR><TD>A</TD><TD>201802</TD><TD>761</TD></TR><TR><TD>B</TD><TD>201802</TD><TD>209</TD></TR><TR><TD>C</TD><TD>201802</TD><TD>219</TD></TR><TR><TD>D</TD><TD>201802</TD><TD>356</TD></TR></TBODY></TABLE><P> </P><P>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.</P><DIV><DIV><SPAN>VAR Group_Selected = CONCATENATEX( VALUES(Table X[Group]),[Group],"|"). By changing the delimiter to "," I can get the result as A,C,D.</SPAN></DIV></DIV><P>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.</P><P>Now I want to apply both these measures as Filters on the above Table to get the SUM of MeterReadings.</P><P>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. </P><P>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.</P><P>Thanking you in advance.</P><P> </P><P> </P>Wed, 10 Jun 2020 09:43:08 GMTkkanda2020-06-10T09:43:08ZCalculate SUM with two slicers
https://community.powerbi.com/t5/Desktop/Calculate-SUM-with-two-slicers/m-p/1150472#M522173
<P>Hello All,</P><P>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:</P><TABLE><TBODY><TR><TD>Group</TD><TD>ReadDate</TD><TD>MeterReading</TD></TR><TR><TD>A</TD><TD>201801</TD><TD>234</TD></TR><TR><TD>B</TD><TD>201801</TD><TD>342</TD></TR><TR><TD>C</TD><TD>201801</TD><TD>432</TD></TR><TR><TD>D</TD><TD>201801</TD><TD>198</TD></TR><TR><TD>A</TD><TD>201802</TD><TD>761</TD></TR><TR><TD>B</TD><TD>201802</TD><TD>209</TD></TR><TR><TD>C</TD><TD>201802</TD><TD>219</TD></TR><TR><TD>D</TD><TD>201802</TD><TD>356</TD></TR></TBODY></TABLE><P> </P><P>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.</P><DIV><DIV><SPAN>VAR Group_Selected = CONCATENATEX( VALUES(Table X[Group]),[Group],"|"). By changing the delimiter to "," I can get the result as A,C,D.</SPAN></DIV></DIV><P>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.</P><P>Now I want to apply both these measures as Filters on the above Table to get the SUM of MeterReadings.</P><P>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. </P><P>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.</P><P>Thanking you in advance.</P><P> </P><P> </P>Wed, 10 Jun 2020 09:43:08 GMThttps://community.powerbi.com/t5/Desktop/Calculate-SUM-with-two-slicers/m-p/1150472#M522173kkanda2020-06-10T09:43:08ZRe: Calculate SUM with two slicers
https://community.powerbi.com/t5/Desktop/Calculate-SUM-with-two-slicers/m-p/1150553#M522206
<P>Hi <LI-USER uid="237469"></LI-USER> ,</P><P> </P><P>Can you please share a screesnhot on your data model and the relationships you have created?</P><P> </P><P>Thanks,</P><P>Pragati</P>Wed, 10 Jun 2020 10:26:27 GMThttps://community.powerbi.com/t5/Desktop/Calculate-SUM-with-two-slicers/m-p/1150553#M522206Pragati112020-06-10T10:26:27Z