# Grand Total - Not showing "Correct"

Hi,

I know there has is many posts about the Grand Total (GT) and i have been reading many of them and especially the one by @BrianJ “Fix incorrect totals” has helped me alot.

However i cant figure this last thing out…

I have the following measure that it calculating the Suqqested order quantity based on our company’s buying multiple.

And the rows are displaying correct as, but yeah the GT is behaving odd. I have tried to implement the fixes fromt the article, which has worked on almost all other measures but this one.

``````M2 SOQ =
VAR Fordeling =  [M2 Pct Of Total Demand] * [M1]
VAR Multi = [Sum af Multiplum forretninger]

VAR AfrundetFordeling =  ROUND( DIVIDE(  Fordeling , Multi, 0 ), 0 ) * Multi

RETURN
IF(
HASONEFILTER('Item'[IITEM - Varenr.] ),
AfrundetFordeling,

SUMX(
VALUES('Item'[IITEM - Varenr.] ),
"Ford", AfrundetFordeling ),

AfrundetFordeling  )
)
``````

When filtering out a single SKU, i get the following table:

I would like it to sum to 31 as my users would expect this to be the sum, when looking at the suqqested order quantity for this SKU.

However it is showing 0 and i have no clue as to why this is the case…

How do i get this fixed? And what material would be good to study further, to really understand this issue?

Important to note: In order for my M1 Behov measure to work, i need to filter, such that M1 > 0. I dont know if this has any importance for the current problem.

Ps.
I have listed the other measures that i use in the case that is necessary.

M1 Measure = Demand

M1 =

VAR Behov = [DemandIndtilOphør] - [Disponibel antal Aspect4] + [Item Order Point (IOP)]
Var Multiplum = [Sum af Multiplum forretninger]

VAR Mellemregning = Behov

RETURN

SUMX(
FILTER(
ADDCOLUMNS( VALUES(‘Item’[IITEM - Varenr.] ),
“Behov”, Mellemregning ),
Mellemregning > 0 ),
Mellemregning )

M1 Behov Measure = Total Demand for all stores per S.

``````M1 Behov =
CALCULATE( [M1], ALLSELECTED('Item'[ISTOR - Sted]) )
``````

M2 Pct measure = Pct. that Total demand makes of our current stock in the DC
M2 Pct Of Total Demand =

``````IF(
HASONEVALUE('Item'[IITEM - Varenr.] ),
MIN ( DIVIDE([CLV LagerAntal], [M1 Behov], 0 ), 1 ),

SUMX(
VALUES( 'Item'[IITEM - Varenr.] ),
"CLV Lager", [CLV LagerAntal],
"Total Behov", [M1 Behov] ),

MIN ( DIVIDE([CLV Lager], [Total Behov], 0 ), 1 )))
``````

HI,

pls provide your work in progress pbix.

Thanks,
Anurag

Hello @FrederikForum, it’s been a while since we got a response from you.

Kindly provide the masked PBIX requested above so they can help you further.

In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.

Hi,

I am sorry, but i am unable to provide this pbix file. However i figured a solution out in the meantime.

Thanks anyway though. You can just mark the post as solved.

Kind regards

Frederik