cancel
Showing results for
Did you mean:
antlav Frequent Visitor

## Index of opinion

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

1 ACCEPTED SOLUTION

Accepted Solutions Community Support Team

## Re: Index of opinion

hi, @antlav

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

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. Community Support Team

## Re: Index of opinion

hi, @antlav

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

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.

Announcements #### Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge. #### Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones. #### Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future. #### Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI. Top Kudoed Authors
Users Online
Currently online: 278 members 3,135 guests
Recent signins:
• richardc • rheiasilvia • nikolaz • aagarwal2 • PhMeDie • SamsonAnalytics • Qing • rd89 • smbonebr • mstark • PowerBIRookievc • TheBlacklist • lonerwalker • TooTall 