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
Kpham
Resolver I
Resolver I

Filter on different tables

 

Dear PBI expert,

I need to calculate the turnover and therefor I need to filter the turnover based on attributes from two different tables. The tables all have a relationship with eachother. But I can't figure out how to make this measure. I tried two different ways, but don't get the right result. Can somebody tell me how you can filter on different tables.

 

Measure2 = CALCULATE(SUM('SD SalesDocumentLines'[Net Value in EUR]),
    FILTER( 
                'SD SalesDocumentLines',[Account Assignment Group Material] ="R4"),
    FILTER(
                'MD SalesDocumentTypes',[Sales Document Type  Code] = "ZSPR"))
Measure = CALCULATE(SUM('SD SalesDocumentLines'[Net Value in EUR]),
    FILTER( 
            crossjoin(
                ALL('SD SalesDocumentLines'[Account Assignment Group Material]),
                ALL('MD SalesDocumentTypes'[Sales Document Type  Code])
                ),
                [Account Assignment Group Material]="R4" ||
                [Sales Document Type  Code] = "ZSPR" 
    )
)

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

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.