Forum Discussion
Anonymous
6 years agoNot applicable
Weighed Average for User Feedback
Dear all, I have read some articles here in regards of the weighed average DAX expression. But I was not able to get the needed solution (or I am just not skilled enough). My current situtaion i...
- 6 years ago
Hi Anonymous ,
First try to unpivot your table:
Then create a calculated column for weighted:
weighted = VAR a = CALCULATE ( COUNT ( 'Table'[Supplier] ), ALLEXCEPT ( 'Table', 'Table'[Question], 'Table'[Supplier] ) ) VAR b = CALCULATE ( COUNT ( 'Table'[Supplier] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[Question], 'Table'[Supplier] ), 'Table'[Value] = EARLIER ( 'Table'[Value] ) ) ) RETURN b / aLast create the measure for WAC:
WAC = SUMX(SUMMARIZE('Table','Table'[Supplier],'Table'[Question],'Table'[Value],'Table'[weighted],"weightedvalue",'Table'[Value]*'Table'[weighted]),[weightedvalue])For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Ec9jvEYkrDBGh-4Ghsieaa4BELptGFAnzBcf7rayyZLQ5A?e=KW2PHI
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
amitchandak
Super User
6 years agoAnonymous , I think you should unpivot this data
https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/
Then you can have logic to multiple in a column based on rating