cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dw700d
Helper V
Helper V

summing with multiple filers and a related table

I am trying to create a measure that calculates the Sum of all spend for “Type” (A) where “Transpo” equals(car, boat, truck , bike)  while excluding Accounts 9,10,11. Can anyone help me with this? * The Transpo Column is in a separate table*

 

Type SpendAccount     Transpo Id         
A             20,000,000    1             100                  
A20,000,0002101
A20,000,0003102
A20,000,0004103
A20,000,0005104
A50,000,0006105
A10,000,0007102
A10,000,0008103
A50,000,0009104
A50,000,00010105
A50,000,00011106
B10,000,0003107
B10,000,0003108

 

 

Transpo id                      Transpo      
100car
101Boat
102Truck 
103Bike
104Plane
105Helicopter
106Scooter
107board
108skate
2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@dw700d , assuming table 1 and table 2 are connected

 

calculate(sum(Table[Spend]), filter(Table, Table[Type] ="A" && not(Table[Account] in {9,10,11})), filter(Table2, table2[Transpo] in{"car", "boat", "truck" , "bike"}))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Hello @dw700d 
It seems like you missed the column name in the filter
FILTER('All Locations','All Locations'[Column]{"CELL","CELL DAS","CELL CO","CELL NODE", "SMART CELL", "MICROWAVE"}))

View solution in original post

5 REPLIES 5
dw700d
Helper V
Helper V

@amitchandakthank you, see the dax below
 
Total Non QOZ PO = CALCULATE( SUM('GSCS PO Commitment'[Total PO Value]),
FILTER('GSCS PO Commitment',[QOZ Status Type] ="Non-QOZ Location" &&
NOT 'GSCS PO Commitment'[Account Code]
IN{"2003.92C","2003.510C","2003.399C"}),FILTER('All Locations',{"CELL","CELL DAS","CELL CO","CELL NODE", "SMART CELL", "MICROWAVE"}))

Hello @dw700d 
It seems like you missed the column name in the filter
FILTER('All Locations','All Locations'[Column]{"CELL","CELL DAS","CELL CO","CELL NODE", "SMART CELL", "MICROWAVE"}))

View solution in original post

amitchandak
Super User
Super User

@dw700d , assuming table 1 and table 2 are connected

 

calculate(sum(Table[Spend]), filter(Table, Table[Type] ="A" && not(Table[Account] in {9,10,11})), filter(Table2, table2[Transpo] in{"car", "boat", "truck" , "bike"}))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Thank you @amitchandak 

 

My Tables are connected but I get the following message below

Any suggestions?

dw700d_0-1611229075013.png

 

 

@dw700d , can share the formula, you used?

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

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