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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Baudi
New Member

Issue with Grouping in Power BI

Hello everyone,

I’m still relatively new to Power BI and currently facing a conceptual issue. I’m working with two tables: Orders and CLE.

  • The Orders table contains a week number field, which I want to group by, as well as a production date, representing the planned production date.
  • The CLE table contains the individual bookings and a posting date, which indicates when the production was actually booked.

My goal is to analyze, for each week, how much was booked on the planned date (production date). My calculation works correctly for individual records, but as soon as I group by week, my measure always returns BLANK.

Does anyone have an idea what might be causing this issue or how I can resolve it?

Thanks in advance!

 

QuantityOnTime = SUMX(
        FILTER(
            'CLE', 
            'CLE'[Posting Date] = SELECTEDVALUE(Orders[Production Date])
        ), 
        'CLE'[Quantity]
    )

 

 

Baudi_2-1740218176129.png

 

 

 

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Try this approach

  1. Create a Calendar Table with calculated column formulas for Year, Month name, Month number and Week number.  Sort the Month name by the Month number
  2. Create a relationship (Many to One and Single) from the Date column of the 2 Fact tables to this Calendar table
  3. To your visual, drag Year and Week number from the Calendar table
  4. Write this measure

Measure = sum('cle'[Quantity])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Anonymous
Not applicable

Thanks for the reply from Ashish_Mathur  and samratpbi , please allow me to add some more information:
Hi  @Baudi ,

You can join [Posting Date] and [Product Date] as a join relationship between two tables

vyangliumsft_0-1740390001039.png

This way whether you use the table CLE's [Quantity] directly or create a measure with the following content, it will display properly:

Measure =
SUMX('CLE',[Quantity])

vyangliumsft_1-1740390001040.png

Note: You need to click on visual to set the blank rows to be filtered from the side filters, because data that is not connected to the two tables will be aggregated in the blank rows.

vyangliumsft_2-1740390039641.png

 

 

Best Regards,

Liu Yang

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

4 REPLIES 4
Anonymous
Not applicable

Thanks for the reply from Ashish_Mathur  and samratpbi , please allow me to add some more information:
Hi  @Baudi ,

You can join [Posting Date] and [Product Date] as a join relationship between two tables

vyangliumsft_0-1740390001039.png

This way whether you use the table CLE's [Quantity] directly or create a measure with the following content, it will display properly:

Measure =
SUMX('CLE',[Quantity])

vyangliumsft_1-1740390001040.png

Note: You need to click on visual to set the blank rows to be filtered from the side filters, because data that is not connected to the two tables will be aggregated in the blank rows.

vyangliumsft_2-1740390039641.png

 

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Ashish_Mathur
Super User
Super User

Hi,

Try this approach

  1. Create a Calendar Table with calculated column formulas for Year, Month name, Month number and Week number.  Sort the Month name by the Month number
  2. Create a relationship (Many to One and Single) from the Date column of the 2 Fact tables to this Calendar table
  3. To your visual, drag Year and Week number from the Calendar table
  4. Write this measure

Measure = sum('cle'[Quantity])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
samratpbi
Super User
Super User

Hi, I can see you have relationship where Order table filtering CLE table. If you want to have Quantity from the CLE table, then simply create a below measure:

Total Qty = SUM(CLE[Quantity]).

Now if you bring your Week no, Production date along with the above measure, it should return the value correctly.

If this help to resolve your problem then please mark it as solution, thanks!

Hello,

I can calculate the total sum, but in the end, I want to have three measures: "Early Quantity ", "On Time Quantity ", and "Late Quantity ". I'm not sure how to aggregate this correctly by week.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors