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
Anonymous
Not applicable

SUMIF without Filter

Hi good people,

 

Need a help.

 

I have a measure

 

Shift A =
CALCULATE(
    SUM('Database'[Actual Production (Carton)]), FILTER(Database,Database[Shift]="A")   
)
 
I want to SUM [Actual Production (Carton)] where Shift is A but I also want to show all the other rows which does not have any value for Shift A. Currently this measure is filtering and showing only rows which has value for Shift A. How do i do it?
6 REPLIES 6
amitchandak
Super User
Super User

Try

Shift A =
CALCULATE(
    SUMX('Database', If(Database,Database[Shift]="A",[Actual Production (Carton)],0))   
)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

Anonymous
Not applicable

Try this,

Sumx(table,if(table[col]="A",table[quantity],0))

Cheers,
Pravin

If it resolves your problem Mark it as solution and give Kudos.
Anonymous
Not applicable

This is my measure:

 

Shift A =
CALCULATE(
    SUMX(Database,IF(Database[Shift]="A",Database[Actual Production (Carton)],0)))
 
This is my relation:
Untitled.png
 
This is the table I want to make, where I will have all the "Product Name" from the "List" table. I want to calculate shift wise production for every single product. In the following table, "AGI" and "Product Name" is from "List" table (because it contains the full list).
 
Untitled2.png
You see in this photo, it has rightly calculated Shiftwise production, but it is now filtering the product names which has no production. I want the Product Names to be there although there is no production.
 
Anonymous
Not applicable

Have you tried my solution?
Anonymous
Not applicable

Yes I did, this is the result.

 

Untitled.png

Anonymous
Not applicable

Can you please share screenshot of issue.

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.