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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Filter depends on different column value

Hi, what I am trying to do is to filter  'Inventory Material DC'[IMDC DC], based on   'Distributor'[DIST Country].

 

 'Distributor'[DIST Country] should be equal to "Poland" or "Denmark".

 'Inventory Material DC'[IMDC DC] can be all if   'Distributor'[DIST Country] is not "Poland", if "Poland" then  'Inventory Material DC'[IMDC DC] should be different than 100.

 

Is it possible to create such a filter?

 

*I am using PowerBI Report Builder.

 

DEFINE
    VAR yesterday =
        TODAY () - 1
    VAR from_date =
        TODAY () - 28
    MEASURE 'Inventory Measures'[Operational Inventory Total] =
        CALCULATE (
            [Operational Inventory],
            FILTER (
                ALL ( 'Inventory Date' ),
                'Inventory Date'[INVD Date] >= from_date
                    && 'Inventory Date'[INVD Date] <= yesterday
            )
        )

EVALUATE
SUMMARIZECOLUMNS (
   
    'Distributor'[DIST Country],
    'Inventory Material DC'[IMDC DC],
    
   
    FILTER (
        VALUES ( 'Distributor'[DIST Country] ),
        ( 'Distributor'[DIST Country] = "Poland" )
            || ( 'Distributor'[DIST Country] = "Denmark" )
          ),
    "Operational Inventory Total", 'Inventory Measures'[Operational Inventory Total],

)

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

What is the logic of the following sentence? If the country is not Poland or Denmark, all 'Inventory Material DC'[IMDC DC] values will be calculated; if it is one of these two countries, it will be 100? Please correct me if my understanding is wrong...


 'Distributor'[DIST Country] should be equal to "Poland" or "Denmark".

 'Inventory Material DC'[IMDC DC] can be all if   'Distributor'[DIST Country] is not "Poland", if "Poland" then  'Inventory Material DC'[IMDC DC] should be different than 100.


In order to provide you a suitable solution, could you please share some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified rdl file. Thank you.

How to upload PBI in Community

Best Regards

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.