Forum Discussion
Anonymous
8 years agoNot applicable
Help with SUMX: Calculating Total Sales
Hi Everyone, Okay so i have the following table (SALES) which i am importing in to PowerBI using Power Query: Ret Trans Type Style Barcode Date Sales Value Sales Units S 5053366373...
- 8 years ago
Hey,
first I created these two measures
Total Sales Units = SUM('Table2'[Sales Units])and
Total Sales Value = SUM('Table2'[Sales Value])Then I created this measure
Total Sale SUMX = SUMX( VALUES(Table2[Style Barcode]) ,[Total Sales Units] * [Total Sales Value] )Instead of itereating across the table I'm iterating across the filtered barcode(s)
I guess this returns what you are looking for:
Regards,
Tom
TomMartens
8 years agoSuper User
Hey,
first I created these two measures
Total Sales Units =
SUM('Table2'[Sales Units])
and
Total Sales Value =
SUM('Table2'[Sales Value])
Then I created this measure
Total Sale SUMX =
SUMX(
VALUES(Table2[Style Barcode])
,[Total Sales Units] * [Total Sales Value]
)
Instead of itereating across the table I'm iterating across the filtered barcode(s)
I guess this returns what you are looking for:
Regards,
Tom
- Anonymous8 years agoNot applicable
You are a legend TomMartens
"Instead of itereating across the table I'm iterating across the filtered barcode(s)"... Makes Total Sense.
Thanks for the quick respon :)