Forum Discussion
Josh0112
2 years agoNew Member
Simple DAX Query Question
I'm trying to create the following measure. I have two columns, one is a score and one is a text response. Like below NPS Theme 100 good 0 good -100 bad 100 ...
- 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])
Dangar332
2 years agoResident Rockstar
Hi, Josh0112
make new table and use below code
new table = SUMMARIZECOLUMNS(yourtable[theme],
"s",CALCULATE(AVERAGE(yourtable[nps]),
yourtable[theme]<>SELECTEDVALUE(yourtable[theme])
)
)
here s = Average of NPS when theme not included
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.