Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

QnA Dashboard sentiment bug - using incorrect field #362

Open
daltskin opened this issue Dec 14, 2017 · 1 comment
Open

QnA Dashboard sentiment bug - using incorrect field #362

daltskin opened this issue Dec 14, 2017 · 1 comment

Comments

@daltskin
Copy link

There is a bug in the QnA Dashboard which shows the incorrect sentiment. Current code is using the QnA score field eg:

sentiment=toint(todouble(customDimensions.score)*100)

          type: 'ApplicationInsights/Query',
          dependencies: { queryTimespan: 'dialog_sentimentConversations:queryspan' },
          params: {
            query: () => `
              customEvents
              | extend conversation=tostring(customDimensions.conversationId),
                timestamp=tostring(customDimensions.timestamp),
                userId=tostring(customDimensions.userId),
                sentiment=toint(todouble(customDimensions.score)*100)
              | where name=='MBFEvent.QNAEvent'
              | summarize count=count(), sentiment=avg(sentiment), maxTimestamp=max(timestamp) by conversation
              | extend color=iff(sentiment > 80, '#4caf50', iff(sentiment < 60, '#F44336', '#FFc107')),
                icon=iff(sentiment > 80, 'sentiment_very_satisfied',
                iff(sentiment < 60, 'sentiment_dissatisfied', 'sentiment_satisfied'))
              | order by sentiment`,
            mappings: { id: (val, row, idx) => `Conversation ${idx}` }```
@morsh
Copy link
Contributor

morsh commented Dec 14, 2017

@itye-msft - can you take a quick look at it? I saw this, and it seems the query looks at 'score' column instead of searching for a sentiment column.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants