Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear experts,
I need to multiply a measure by another measure in a table.
One of the measures needs a particular column structure to give the intended result
I have a matrix in with I've switched columns and rows and my rows are:
Calendar Year, Calendar Month, Week, Week Day.
The measure works and I need to multiply this measure "Forecast" on a row-by-row by another measure "Agregate Factor"
My firs attempt was a simple SUMX:
testAgregate = SUMX(VALUES('Date'[Date]); [Forecast allocated2] * [Agregate Factor])
but this is giving me wrong results:
Then I tried using summarizecolumns:
testAgregate = SUMMARIZECOLUMNS( 'Date'[Calendar Year]; 'Date'[Calendar Month]; 'Date'[Calendar Week]; 'Date'[Week Day]; 'Date'[Date]; "Test Agregate" ; SUMX(VALUES('Date'[Date]); [Forecast allocated2] * [Agregate Factor]) )
But I'm getting the error "The expresion refers to multiple columns. Multiple columns cannot be converted to a scalar value"
What am I doing wrong?
Solved! Go to Solution.
Hi @setis ,
we can create measure using following DAX to meet your requirement.
testAgregate = SUM(Data[Forecast allocated2]) * SUM(Data[Agregate Factor])
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
Hi @setis ,
we can create measure using following DAX to meet your requirement.
testAgregate = SUM(Data[Forecast allocated2]) * SUM(Data[Agregate Factor])
If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.
Best regards,
Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |