Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dw700d
Post Patron
Post Patron

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"}))

View solution in original post

Anonymous
Not applicable

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
Post Patron
Post Patron

@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"}))
Anonymous
Not applicable

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"}))

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"}))

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?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.