Forum Discussion
Simple DAX Query Question
- 2 years ago
This DAX measure worked for me:
Average of NPS when theme not included = var themeNotIncluded = FILTER(ALL('Table'), 'Table'[Theme] <> SELECTEDVALUE('Table'[Theme])) return AVERAGEX(themeNotIncluded, 'Table'[NPS])
Josh0112 , Explain the issue properly.
- Josh01122 years agoNew Member
Can you let me know what additional information i could include to sufficiently explain?
In short i'm trying to create a measure which is AVERAGE(NPS) but to somehow use the discrete text combinations in theme column (good, bad, other, fun) as an exclusion filter. Each row has a unique id assigned to it so can be treated as a single response in a survey. E.g. first person gave a score of '100' and a theme of 'good' , second person gave a score of '0' and a theme of 'good' etc.
So when i drop this in to a table against the theme 'good' in the theme column i want it to show the average of NPS for all themes combined except for the nps scores associated to the responses that answered 'good'. In the example i provided this would mean that the average of all NPS scores excluding the ones with text response 'good' = -100 (bad) + 100 (other) + 100 (bad) + 100 (fun) / 4 = 50