Hi,
I have set up two simple tables, "tsales" ; Product , Sales , Discount applied, and 'Product' consisting of Product , Price,
so revenue would be
ignoring the discount and iterating over the product table
what I'm attempting to do is iterate over the dim table but still incorporate the discount from the fact table.
the closest I've got is
I did try ;
but this did not work.
Any suggesstions , thought on the best way to tackle this sort of problem?
Richard.
I have set up two simple tables, "tsales" ; Product , Sales , Discount applied, and 'Product' consisting of Product , Price,
so revenue would be
Excel Formula:
tsalesA:=SUMX(Tsales,Tsales[Sales]*(1-Tsales[Sales Discount])*RELATED('Product'[Price]))
ignoring the discount and iterating over the product table
Excel Formula:
Over Product No discount:=SUMX('Product','Product'[Price]*CALCULATE(SUM(Tsales[Sales])))
what I'm attempting to do is iterate over the dim table but still incorporate the discount from the fact table.
the closest I've got is
Excel Formula:
tsales summarize:=SUMX(SUMMARIZE(Tsales,'Product'[Price],Tsales[Sales Discount]),'Product'[Price]*(1-Tsales[Sales Discount])
*CALCULATE(SUM(Tsales[Sales])) )
I did try ;
Excel Formula:
over two:=SUMX('Product','Product'[Price]]*CALCULATE(SUMX(SUMMARIZE(Tsales,Tsales[Sales],
Tsales[Sales Discount]),Tsales[Sales]*(1-Tsales[Sales Discount]) )))
but this did not work.
Any suggesstions , thought on the best way to tackle this sort of problem?
Richard.