cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jeff_JZ
Regular Visitor

Unrelated Slicer to Filter Fact Tables

Hi, 

I have a visual (profit and Loss Statement) which draws data from 2 fact tables. One transacction fact table has all revenue and expense transations with sales site/office/group details. It has a column for sales material. The other fact table is for allocation which is allocating by volumn at site level. I have a site demention table which connects to both fact tables. 

I want to add a slicer for sales material, which is at transation level. The transaction table is filtered correctly but the allocation table cannot be filtered. The visual shows 100% of the allocation. What can I do to filter out all allocation amounts while the material slicer is unrelated to the allocation table? 

 

Thank you very much for your helps,

Jeff

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jeff_JZ , if you have the material in that table and it is available in the table you can use

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

 

or get material and want to filter site in table 2

 

measure  =

var _tab = summarize(allselected(Table1), Table[Site]) // site can come from Dim too. with allselected to table 

return

calculate(Sum(Table2[Value]) , Filter(Table2, Table[Site] in _tab) )



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Jeff_JZ , if you have the material in that table and it is available in the table you can use

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

 

or get material and want to filter site in table 2

 

measure  =

var _tab = summarize(allselected(Table1), Table[Site]) // site can come from Dim too. with allselected to table 

return

calculate(Sum(Table2[Value]) , Filter(Table2, Table[Site] in _tab) )



Power BI Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s || 50+Power Query List Functions : Learn Power Query List
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!
Want To Learn Power BI | Beginners !! Advance Concepts !! Power BI For Tableau User !!

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 25

Ted's Dev Camp - August 25, 2022

Watch Session 25 of Ted's Dev Camp.

Top Solution Authors