Forum Discussion

Dennis_Pedersen's avatar
4 years ago

SUMX - problem subtotal

Hi

I my fact sales table I have a Pcs_grouping column depending on how many pcs the customer bought of that item. See below.

I try to calculate the best price for the customer with Best_Gross

 

Best_Gross:= sumx(values(vDIM_Items[ItemID]),[QTY_FromFactSalesTable]*[BestPrice_FromItemtable])

 

This is working fine if I put "Pcs_Grouping from fact sales table" in my rows.

But if I put "ID_pcs from dimension table" in my rows the subtotals are incorrect. This table is a related dimension table. See below

 

Can anybody help correcting my SUMX formula so I can use "ID_pcs from dimension table" with correct subtotals?

 

The 

 

 

 

 

3 Replies