Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have index calculation challenge, where text rating of (Happy, Neutral or Unhappy) trend to turn index value.
Table as follows:
Time | Attitude | Speed | Result | Sum | Index | ||
1/15/19 | Happy | Happy | Happy | 300 | Note. Happy = 100 -> 3 x 100 = 300 | 100,0 | Note. Sum/3 |
1/20/19 | Neutral | Neutral | Neutral | 150 | Note. Neutral = 50 -> 3 x 50 =50 | 50,0 | |
2/4/20 | Unhappy | Neutral | Unhappy | 50 | Note. Unhappy = 0 -> 0+50+0 = 50 | 16,7 | |
500 | |||||||
Attitude, Speed and Result are columns of answers, where selected rating is given between Happy (valued 100), Neutral (valued 50) or Unhappy (valued 0).
The aim is to value each answer and then calculate monthly index so that index value of each row is sum divided by 3, then summarize the value of rows in specific month and divide that by amount of rows in month.
Example:
First row sum = 300 and Index is 300/3 = 100
Second row sum = 150 and index is 150/3 = 50
Total score in January is 100 + 50 = 150 and there are two rows so Index value for January is 150/2 =75
Any help would be highly appreciated
Thanks
Solved! Go to Solution.
hi, @Anonymous
You could use this way as below:
Step1:
Add a dim value table for text rating as below:
Step2:
Then use LOOKUPVALUE Function to add a Sum and Index column
Sum = LOOKUPVALUE('Dim value'[Value],'Dim value'[Type],'Table'[Attitude])+LOOKUPVALUE('Dim value'[Value],'Dim value'[Type],'Table'[Speed])+LOOKUPVALUE('Dim value'[Value],'Dim value'[Type],'Table'[Result])
Index = 'Table'[Sum]/3
Step3:
Add a measure of Index value for month
Result:
and here is pbix file, please try it.
Best Regards,
Lin
hi, @Anonymous
You could use this way as below:
Step1:
Add a dim value table for text rating as below:
Step2:
Then use LOOKUPVALUE Function to add a Sum and Index column
Sum = LOOKUPVALUE('Dim value'[Value],'Dim value'[Type],'Table'[Attitude])+LOOKUPVALUE('Dim value'[Value],'Dim value'[Type],'Table'[Speed])+LOOKUPVALUE('Dim value'[Value],'Dim value'[Type],'Table'[Result])
Index = 'Table'[Sum]/3
Step3:
Add a measure of Index value for month
Result:
and here is pbix file, please try it.
Best Regards,
Lin
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |