Forum Discussion
row-wise multiplication
- 4 years ago
Hi sam_nik12345 ,
By my test, add a row is not supported by DAX, you can add a calculated column instead, here's my solution.
1.This is my sample.
2.In Power Query, select all columns at the same time, then click Unpivot Columns tab under the Transform ribbon.
Get this result.
3.Click Use First Row as Headers tab under the Transform ribbon, and rename the Product column.
Get this result.
4.Create a measure.
P = IF ( MAX ( 'Table'[Date] ) = "Fact", BLANK (), MAX ( 'Table'[b] ) * MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Date] = "Fact" ), 'Table'[b] ) )Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi sam_nik12345 ,
By my test, add a row is not supported by DAX, you can add a calculated column instead, here's my solution.
1.This is my sample.
2.In Power Query, select all columns at the same time, then click Unpivot Columns tab under the Transform ribbon.
Get this result.
3.Click Use First Row as Headers tab under the Transform ribbon, and rename the Product column.
Get this result.
4.Create a measure.
P =
IF (
MAX ( 'Table'[Date] ) = "Fact",
BLANK (),
MAX ( 'Table'[b] )
* MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Date] = "Fact" ), 'Table'[b] )
)
Get the result.
I attach my sample below for reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.