# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  Dax Minx issue for Grandtotal and Performance problem

## hansolu

Hi

I do have a nice file showing the Sales of Burgers (Finish Good level). Each Burger need some sauce (Sub1 Level) and each sauce has some ingredient (Sub2ID) 

I managed to calculate the need in total auf each Ingredient. As a result I can now show the Days on Hand for each ingredient as well as how many % of each burger I can make based on the stock of each ingredient. 
Took me a while to manage the model and calculation, my most important measures are "Rohstoff vs. Demand % Based Stock this Week" and "Sub2 DOH"



However, now I am facing 2 issues.

1.  MinX for grand total (See sheet "Overview Burger"). The values for each Sub2Item are fine, but if I collapse the Burger level, the total is not the minimum of all their sub2ID, its something different. Also the row grand total, is wrong. Should be the minimum of all the weeks which are shown.

2. I copied the same measures to a bigger file (80k sales rows). Its not soo big but the whole calculation crashes on 32 bit Excel during update. After I change to 64 bit, the update is working but takes too long time. Time is not an issue, but I need to go back to 32 bit version!
Are my measures too complex or is my model wrong setup and therefore too slow? 
The biggest measure is the DOH. I am looking for negative value of a running total, then calculate the days from the current row to the Hit Date. If no negative value then I calculate the average usage 




```
Please Login or Register  to view this content.
```


Any help would be great

thanks

----------


## hansolu

Sorry, did not see that the upload of my testfile did not work. 
Now its fine. Btw, the file with the 80k rows is also only 1.8 MB big, so no reason for 32bit excel to crash

The measure for the Minx Problem is this one:




```
Please Login or Register  to view this content.
```


thanks

----------


## hansolu

HI

i split my measure and now its a bit closer to my target.




```
Please Login or Register  to view this content.
```


Row total and column total are fine, showing the min value. the total value for a subtotal row is wrong. 
I marked them in the sheet "Overview Burger" in yellow. 

any idea why?

Thanks

----------

