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
ebrownretail
Resolver I
Resolver I

Subtotals and summaries not working

Hi!

I have a table that helps me determine what i should order. The measures work at a row level, but the subtotal/summary is not always working. 

 

As you can see in the below screenshot, i have a DC, Store, and order listed. The order column is subtotaling, but the subtotal is not right. In Excel it is showing a different amount. 

ebrownretail_0-1722890692263.png

 

Regional DCStore NumberBuilding CityBuilding State/ProvSum of On HandTotal On OrderTotal PipelinePrior Week SalesOrder
                 3,185
6006306ARABAL700704349
6006423ALABASTERAL152015292147
60061469CHATTANOOGATN560563549
6010604DOTHANAL149504698
6010944CRESTVIEWFL650655098
60102630JESUPGA098984949
60202081CLEARWATERFL580582949

 

 

The other issue i am having is that i cannot then take this large set of data and summarize it by DC. It si not bringing all the DCs through. 

 

ebrownretail_1-1722890872482.png

 

I am using this measure to calculate my order. 

Order =
IF([Curr item Trait] > 0, IF([Order Need] < 0, BLANK(), MROUND([Order Need],49)), BLANK())
 
These are the other measures used to make the order measure:
 
Order Need =
[Curr WOS] - [Total Pipeline]
 
Curr WOS =
 [Prior Week Sales] * CALCULATE(SELECTEDVALUE('WOS Listing'[WOS]),FILTER('WOS Listing', 'WOS Listing'[Month] = [Current_month]))
 
Prior Week Sales =
CALCULATE(SUMX('All Sales History (Not Curr WK)','All Sales History (Not Curr WK)'[POS Sales]),FILTER('All Sales History (Not Curr WK)',CALCULATE(MAX(Dates[Walmart Week]),FILTER(Dates,Dates[Date] = TODAY()-7))))
 
Total Pipeline =
[Total On Order] + SUMX('Current Pipeline','Current Pipeline'[On Hand])
 
Total On Order =
SUMX('Current Pipeline', 'Current Pipeline'[On Order]) + SUMX('Current Pipeline', 'Current Pipeline'[In Warehouse]) + SUMX('Current Pipeline','Current Pipeline'[In Transit])
1 ACCEPTED SOLUTION
sivarajan21
Post Prodigy
Post Prodigy

Thanks @amitchandak @Anonymous 

 

Hi @ebrownretail ,

 

If I am correct, for your first issue, you have created a measure to calculate your order which is not returning correct subtotal.From the sample data provided as below:

Regional DCStore NumberBuilding CityBuilding State/ProvOrder
6006306ARABAL49
6006423ALABASTERAL147
60061469CHATTANOOGATN49
6010604DOTHANAL98
6010944CRESTVIEWFL98
60102630JESUPGA49
60202081CLEARWATERFL49

 

You can use a measure as below to calculate correct subtotal for your order measure:

 

Order sum = CALCULATE(SUM(Merchandise[Order]),ALLEXCEPT(Merchandise,Merchandise[Regional DC]))

 

Result is:

sivarajan21_0-1723448022327.png

If this is not correct,I suggest you to provide a sample data as @Anonymous  said and we will be able to assist you with this.

 

Thanks in advance!

 

 

View solution in original post

4 REPLIES 4
sivarajan21
Post Prodigy
Post Prodigy

Thanks @amitchandak @Anonymous 

 

Hi @ebrownretail ,

 

If I am correct, for your first issue, you have created a measure to calculate your order which is not returning correct subtotal.From the sample data provided as below:

Regional DCStore NumberBuilding CityBuilding State/ProvOrder
6006306ARABAL49
6006423ALABASTERAL147
60061469CHATTANOOGATN49
6010604DOTHANAL98
6010944CRESTVIEWFL98
60102630JESUPGA49
60202081CLEARWATERFL49

 

You can use a measure as below to calculate correct subtotal for your order measure:

 

Order sum = CALCULATE(SUM(Merchandise[Order]),ALLEXCEPT(Merchandise,Merchandise[Regional DC]))

 

Result is:

sivarajan21_0-1723448022327.png

If this is not correct,I suggest you to provide a sample data as @Anonymous  said and we will be able to assist you with this.

 

Thanks in advance!

 

 

amitchandak
Super User
Super User

@ebrownretail , In such case you can use measures like

 

Curr WOS new= sumx(Values(Table[Regional DC]), [Curr WOS])

 

Order  new= sumx(Values(Table[Regional DC]), [Order ])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi!

That did not work. Below is what the values should have been:

Row LabelsSum of Order
6006245
6010245
6020147
6023147
602449
602649
6027196
603049
6035147
603649
603798
603998
604049
6048245
605498
6068147
6070588
702649
7034245
7035147
703698
Grand Total3185

 

But the formula came back with this:

ebrownretail_0-1722954810366.png

 

Anonymous
Not applicable

Hi @ebrownretail,

 

According your statement, I think there should at least four tables in your data model: 'Current Pipeline’, 'All Sales History','WOS Listing' and 'Date'.

It seems that [Order] measure couldn't return correct data. Or we just need to create a new measure to sum [Order] based on [Regional DC] as amitchandak mentioned.

So I suggest you to share a easier sample file with a same data model with us. This will make us easier to find the solution.

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.