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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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