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

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 IV
Super User IV

@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 !! YouTube Channel !! Connect on Linkedin

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 IV
Helper IV

@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 IV
Super User IV

@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 !! YouTube Channel !! Connect on Linkedin

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 !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.