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
dEllE
Helper I
Helper I

Subtracting acumulated sum per date does not work in existing report (but in test report)

Hello folks,
I have the following problem and am about to give up 😞

 

A source table contains the forecast quantity per day and article.

I calculate the cumulative total of the forecast quantity per day and article with the following measure:

 

Sales plan Qty by day cummulated Msr =
CALCULATE(
    'Sales plan by day'[Sales plan Qty by day Msr],
        FILTER(ALLSELECTED('DAX-Calendar'[Date]),
            'DAX-Calendar'[Date] >= TODAY() &&
            'DAX-Calendar'[Date] <= MAX('DAX-Calendar'[Date]
            )
        )
)


Another table contains the current inventory per item.

Now I calculate the reach per day and article using the following measure:

 

Remaining Qty Msr =
SUM('Item stock to date'[Stock_qty]) - [Sales plan Qty by day cummulated Msr]


This works in my test report, which only contains the required tables.

Unfortunately it doesn't work with the same measures in my existing report and I can't find the error.

 

When the day of subtracting the accumulated sum starts, the stock quantity is gone!

 

I checked all the table relationships in the model view. Everything looks correct to me.

Maybe one of you can see where the error could be.

 

Working report and model view:

report_view_working.jpg

Model_view_working.jpg

 

NOT working report and model view:

report_view_not_working.jpg

 

model_view_not_working.jpg

 

I hope you can see everything in the pictures.

If there are any further questions, please just ask.

Hope I finally get this problem solved.

 

Thanks in advance.

Greetings dEllE

1 ACCEPTED SOLUTION
dEllE
Helper I
Helper I

@Greg_Deckler .

There were no visual, page or report filters, BUT for whatever reason I made the relation between "item" and "sales invoices" bidrectional. This was causing problems with the dates relation between "sales plan" and "stock to date".

 

So thx for the idea with filtering.

 

View solution in original post

2 REPLIES 2
dEllE
Helper I
Helper I

@Greg_Deckler .

There were no visual, page or report filters, BUT for whatever reason I made the relation between "item" and "sales invoices" bidrectional. This was causing problems with the dates relation between "sales plan" and "stock to date".

 

So thx for the idea with filtering.

 

Greg_Deckler
Community Champion
Community Champion

@dEllE Long shot but perhaps the removal of the leading zeros from the ? item number ? broke something in the relationships in the model? Otherwise, check the filters on the page and make sure that some other table isn't filtering your Item table and causing issues.



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...

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