Forum Discussion
MP_123
Microsoft Employee
9 years agosumx question
hi, i want to create a weighted average as below image the most left is the numirator , and the most right is the denominator. i want to create: 5316278/1+314443/2 the result for each row i...
Phil_Seamark
Microsoft Employee
9 years agoMP_123
Microsoft Employee
9 years ago- MP_1239 years ago
Microsoft Employee
this is the definition of sumx -
Returns the sum of an expression evaluated for each row in a table.
seems like it's not the sum of an expression-
what the PBI does is sum(UsersCount)\2
- Phil_Seamark9 years ago
Microsoft Employee
Hi there,
Any chance you can post the sample set of data that makes this up. As well as the code you are using to build your [Target] measure.
Cheers,
- MP_1239 years ago
Microsoft Employee
thank you Phil_Seamark!
this is my data
what I want to get is avg per week, so for 'User Location_Main' - it will be (158612+155831)\2 (=distinct count of target date)
and for the first, it will be just divided by 1.
what I want to get is the sum of this two averages. power BI divided the total sum by 2 and it's wrong