I’m new to DAX and trying to learn/understand it better in Power BI. Here is the sample set of data that I have:
What I would like to do is create a measure that multiplies the [Lead_Points]*[Lead_Modifier] for every row. This was simple enough, and I’ve created such a measure called [Lead_Weight]. Next though is where I’m getting stuck. I want to divide the [Lead_Weight] for each row by the SUM of the [Lead_Weight] for each unique [ID].
I’ve tried to use the SUMMARIZE function to create a virtual table and then use the result of that in a DIVIDE function, but it doesn’t like that because multiple columns are returned.
I’m sure there is a simple answer to this, but I’m having a difficult time understanding the concepts around DAX.
>Solution :
Simple:
Measure =
DIVIDE (
[Lead_Weight],
CALCULATE (
[Lead_Weight],
ALLEXCEPT ( 'Table', 'Table'[ID] )
)
)