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
ninago
New Member

Put the sum into a specific field....

Hello! I'm new here and in PowerBI so my question may be a little dumb, but here it goes...

 

My first column has the code from different stores. Each store is fulfilled by other unit (second column). This unit can fulfill more than one store. Every store has a limit of how many pounds of the product she can ask the unit to ship to them. This limit is on the 4th column (MRF). By default, this limit is linked to the "product type 0,43".

 

I need to know what is the total limit (MRF) that a unit can ship, no matter which store it is. I uploaded an image (the second one) as an example: Fulfillment unit number 9668 ships product to several stores. Each store has a limit. The total limit would be the sum of those limits, right? But this total should be written only in the field where the first column is the same code as the second column AND the product type is "0,43". I highlighted the image to show what I mean. In the example, the result should be 9668 9668 0,43 560. It can be a calculated column or a measure, I don't know. The problem is that, when a put the new value in a table field (visual) it segregates between the stores....And I need it consolidated in just that one specific unit and product type...

 

I really appreciate your help...

 

 

help bi 2.png

 

 help bi.png

 

help bi 3.png

 

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @ninago 
For measure use

=
IF (
    SELECTEDVALUE ( TableName[Centro_Venda] )
        = SELECTEDVALUE ( TableName[Centro_Productor] ),
    CALCULATE (
        SUM ( TableName[MRF Telheiros] ),
        ALLEXCEPT ( TableName, TableName[Centro_Productor], TableName[Espessura] )
    )
)

for a new calculated column use

=
IF (
    TableName[Centro_Venda] = TableName[Centro_Productor],
    CALCULATE (
        SUM ( TableName[MRF Telheiros] ),
        ALLEXCEPT ( TableName, TableName[Centro_Productor], TableName[Espessura] )
    )
)

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

Hi @ninago 
For measure use

=
IF (
    SELECTEDVALUE ( TableName[Centro_Venda] )
        = SELECTEDVALUE ( TableName[Centro_Productor] ),
    CALCULATE (
        SUM ( TableName[MRF Telheiros] ),
        ALLEXCEPT ( TableName, TableName[Centro_Productor], TableName[Espessura] )
    )
)

for a new calculated column use

=
IF (
    TableName[Centro_Venda] = TableName[Centro_Productor],
    CALCULATE (
        SUM ( TableName[MRF Telheiros] ),
        ALLEXCEPT ( TableName, TableName[Centro_Productor], TableName[Espessura] )
    )
)

Thank you so much. It worked perfectly!

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.