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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now


Add if set by omitting filters

Hello, I explain the case:

In a data source is the table (InventoryCenter) where the inventories of the points of sale are, with the fields:

Cost center (which is the Point of Sale Code - there are several)

CodMol molecule code (it's like a Category Code there are several bar codes with the same CodMol)

The description of the material (of the molecule)

And point-of-sale inventory

... it has other fields, but those are the ones that seem essential to me for the example (there is also the Barcode, which like the Unique Code of the material, but is repeated by batch / expiration date).

In another data source (EDCEDI Inventory) is the distribution center inventory, with the fields:

CEDI (distribution center code - there are several CEDI)

CodMol molecule code (it is like a Category Code that is equal to the one in the table above)

The description of the material (of the molecule)

And the CEDI inventory

I also have a table (MasterMaterial) where the material master is (with the barcode and molecule code), if necessary to make the relationship.

So I'm making a table visual with the Columns Center (which is the point of sale), molecule code, description, inventory of the center and I want to attach the column inventory of the CEDI.

I would like to add if set of the CEDI inventory field by molecule code, without taking into account the point of sale column:


In the InvCEDI field, the sum of the inventory of that molecule must appear in the CEDI. Example in the 401 there are 43,175 of the code 1396, in the 801 40.330 ..., in the Column InvCEDI there can be 20.000 (when performing the sum), this number must appear the same in all the rows that have that molecule code:

I would like a suggestion with a DAX formula (NOT with intermediate tables where this CodMol and InvCEDI sum), to then be able to filter some CEDI of the sum.

I appreciate the suggestions.

Super User
Super User

Are you saying that the distribution center inventory is preallocated for each of the Centros ?

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.