I was trying to get the percentage of distinct rescources in bar graph for one my of the visual in my dashboard, so for that I had used following calculated field: distinctCountOver({res_id},[Y-axis partion],PRE_AGG)/distinctCountOver({res_id}, , PRE_AGG), and I had also added a period controler to filter-out the resources based on the periods however the thing I am struggling with is, In case of multiple period selection I want the percentage should display for the latest period, for achiving this I had added one filter on periodid field of top and bottom type and set the interger value as 1 and aggression of periodId as max, it used to work in maximum cases however not working in this scenario.
Hi @abhjaiswal
Welcome to the community!
You can do your calculations using your period filters in the calculated field to achieve what you want. You don’t need to filter the visual directly by the parameters.
See the article below to see how you can compute values based on periods in the calculated field.
Hope this helps.
Regards,
Giri
Hi Prabhu thanks for help but the above solution is not working in my case
Hello @abhjaiswal !
Are you still working through this problem or were you able to find a solution?
What part(s) of the link @Giridhar.Prabhu posted above is not working? Did you receive any specific errors or were the values returned incorrect?
Hello @abhjaiswal !
Do you still need help with this problem?
No ducan it is resolved, Thanks
Hey @abhjaiswal
I’m glad you were able to get it resolved! Would you be able to post the solution that you came up with to help the community?
Sure @duncan, In above scenario I had changed the calculated field to follows : distinctCountOver({res_id},[Y-axis partition],{periodid}],PRE_AGG)/distinctCountOver({res_id}, [{periodid}], PRE_AGG) , then I set periodId to Y- axis and group I want to partition to Group/Color field of bar graph visual then I had added top bottom filter on periodId field ensuring it will always display visual for latest period.