Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Index of opinion

I have index calculation challenge, where text rating of (Happy, Neutral or Unhappy) trend to turn index value.

 

Table as follows:

TimeAttitudeSpeedResultSum Index 
1/15/19HappyHappyHappy300Note. Happy = 100 -> 3 x 100 = 300100,0Note. Sum/3
1/20/19NeutralNeutralNeutral150Note. Neutral = 50 -> 3 x 50 =5050,0 
2/4/20UnhappyNeutralUnhappy50Note. Unhappy = 0 -> 0+50+0 = 5016,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

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You could use this way as below:

Step1:

Add a dim value table for text rating as below:

9.JPG

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:

10.JPG

11.JPG

and here is pbix file, please try it.

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

You could use this way as below:

Step1:

Add a dim value table for text rating as below:

9.JPG

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:

10.JPG

11.JPG

and here is pbix file, please try it.

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.