Forum Discussion
Anonymous
4 years agoNot applicable
Cumulative %
Hi Can someone please help me to achieve the "cumulative %" measure based on the current displayed data. If possible please attached the Dax Code with an example. Also please adv...
- 4 years ago
Cumul % = var cr = sum('Sales Table'[Qty]) var s = summarize(allselected('Sales Table'),'Sales Table'[Store],"q",sum('Sales Table'[Qty])) var t = filter(s,[q]>=cr) return divide(sumx(t,[q]),sumx(s,[q]))Note that you have ties in your data so the result is a bit ugly.
Anonymous
4 years agoNot applicable
Dear Eason
Thank you so much for your time and help.
The DAX code works perfectly fine, but they are not dynamic.
My real time reports have huge data and I have the area and region as well.
1. This report has restricted area and region wise to display only data of the access granted.
2. Also we will view the report for monthly, quartely, and annualy.
The ranking should change dynamically according to selection.
The currently DAX code we have maintained the data in the column and hence we are getting wrong value when we filter the data.
Appreciate your help to get the above results.
Thanks
Mahad
lbendlin
4 years agoSuper User
Cumul % =
var cr = sum('Sales Table'[Qty])
var s = summarize(allselected('Sales Table'),'Sales Table'[Store],"q",sum('Sales Table'[Qty]))
var t = filter(s,[q]>=cr)
return divide(sumx(t,[q]),sumx(s,[q]))
Note that you have ties in your data so the result is a bit ugly.