Forum Discussion
Multiple choice question viz
- Anonymous2 years ago
Hi Anonymous
You can try to change the Tot # per category measure to the following
Tot # per category = CALCULATE ( COUNTROWS ( f06_mainneeds ), FILTER ( ALLSELECTED ( f06_mainneeds ), [choice] IN VALUES ( f06_mainneeds[choice] ) ) )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
You can try the following code
mainneeds % from total =
VAR _sumofchoice =
CALCULATE (
COUNTROWS ( f06_mainneeds ),
ALLEXCEPT ( f06_mainneeds, f06_mainneeds[choice] )
)
VAR _countofuuid =
CALCULATE ( DISTINCTCOUNT ( f06_mainneeds[uuid] ), ALL ( f06_mainneeds ) )
RETURN
DIVIDE ( _sumofchoice, _countofuuid, 0 )
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous2 years agoNot applicable
Hi Anonymous
Thanks for the suggestion but it doesn't work. As you can see in the image, the chart is making some weird calculations and representing the data as if has to add up to 100%, but it doesn't have to. Each of the bars could eventually be 100% themselves.
Thanks again. Any other ideas?
- Anonymous2 years agoNot applicable
In this chart the values are the correct ones.
To obtain that I've used this solution:
Tot # per category =CALCULATE(COUNTROWS( f06_mainneeds ),ALLEXCEPT(f06_mainneeds,f06_mainneeds[choice]))and then divide this by the total number of surveys, as follows:% mainneeds by total =DIVIDE([Tot # per category],[# encuestas])But it doesn't work when using filters, as I described in the original comment.Again, any ideas?Thanks so much- Anonymous2 years agoNot applicable
Hi Anonymous
You can try to change the Tot # per category measure to the following
Tot # per category = CALCULATE ( COUNTROWS ( f06_mainneeds ), FILTER ( ALLSELECTED ( f06_mainneeds ), [choice] IN VALUES ( f06_mainneeds[choice] ) ) )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.