Forum Discussion
saadat_rda
3 years agoFrequent Visitor
SUMX in direct querry mode
Hi,
I would like to calculate the total based on the client group.
To calculate this I used the DAX expression:
Column = SUMX(FILTER('Table','Table'[ClientGroup]=EARLIER('Table'[ClientGroup])),'Table'[WIP])
However, i get the error: SUMX is is not allowed in Direct Querry mode.
How can I work around this issue?
Thank you in advance
saadat_rda , You have to create a measure
= SUMX(FILTER(allselected('Table'),'Table'[ClientGroup]=max('Table'[ClientGroup])),'Table'[WIP])
3 Replies
- amitchandak
Super User
saadat_rda , You have to create a measure
= SUMX(FILTER(allselected('Table'),'Table'[ClientGroup]=max('Table'[ClientGroup])),'Table'[WIP])
- v-zhangti
Community Support
Hi, saadat_rda
You can try the following methods.
Measure = CALCULATE ( SUM ( 'Table'[WIP] ), FILTER ( ALL ( 'Table' ), [ClientGroup] = SELECTEDVALUE ( 'Table'[ClientGroup] ) ) )Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- saadat_rdaFrequent Visitor
Hello, thank you for your suggestion, it worked.