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

DAX Sum Quantity by Month per Product in a different table

Hi everyone,

 

I have the following columns in Power BI:

  1. "full updated ALL PARTS " table: Order Quantity; Month; Material Number; Vendor Name
  2. "Part Numbers" table: Part Number; Vendor

I'm trying to create a measure where it can calculate Total Order Quantity by Month per Part Number.

I came up with this:

Sum amount = CALCULATE ( SUM ( 'full updated ALL PARTS (2)'[Order Quantity] ), DISTINCT ( 'Part Numbers'[Part Number]))

, however, I don't know how to filter the result by month.

 

Sorry this might look really obvious to some of you but I have very little knowledge with DAX so any helps and recommendations are all appreciated!

Thank you!!!

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Based on your requirement, what about creating the measure with the formula below?

 

Measure =
CALCULATE (
    SUM ( 'full updated ALL PARTS'[Order quantity] ),
    ALLEXCEPT (
        'full updated ALL PARTS',
        'full updated ALL PARTS'[Month],
        'Part Numbers'[Part number]
    )
)

 

If you still help, please share some data sample which could reproduce your scenario and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

So, there is no relationship between the two tables or does your first table also contain part number?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi sorry, I forgot to write it down (already fixed the description)  but the 2 tables do link to each other by Part Number and Material Number columns.

Hi @Anonymous,

 

Based on your requirement, what about creating the measure with the formula below?

 

Measure =
CALCULATE (
    SUM ( 'full updated ALL PARTS'[Order quantity] ),
    ALLEXCEPT (
        'full updated ALL PARTS',
        'full updated ALL PARTS'[Month],
        'Part Numbers'[Part number]
    )
)

 

If you still help, please share some data sample which could reproduce your scenario and your desired output so that we could help further on it.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.