Forum Discussion
Anonymous
4 years agoNot applicable
Pie chart
Hello, I have the following table, and the pie cart terget. Can anyone solve my problem ? DeskId TagId AreaLabel DeskTagLabel D30 3 HR area Universal docking station D31 3 HR ar...
- 4 years ago
Hi, Anonymous
Try to create measures:_AllDeskID = CALCULATE(COUNT('Table'[DeskId]),ALL('Table'))selected = var _isFiltered=ISFILTERED('Table'[DeskTagLabel]) var _tag=SUMMARIZE(ALLSELECTED('Table'),[DeskTagLabel]) var _count=CALCULATE(COUNT('Table'[DeskId]),FILTER(ALL('Table'),'Table'[DeskTagLabel] in _tag)) var _if=IF(_isFiltered,_count,0) return DIVIDE(_if,[_AllDeskID])other = var _isFilterd=ISFILTERED('Table'[DeskTagLabel]) var _tag=SUMMARIZE(ALLSELECTED('Table'),[DeskTagLabel]) var _count=CALCULATE(COUNT('Table'[DeskId]),FILTER(ALL('Table'),NOT('Table'[DeskTagLabel] in _tag))) var _if=IF(_isFilterd,_count,[_AllDeskID]) return DIVIDE(_if,[_AllDeskID])
Result:Please refer to the attachment below for details. Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-angzheng-msft
Community Support
4 years agoHi, Anonymous
Can you explain how you got the pie chart above?
I can't seem to get 20% and 80% from your data
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi v-angzheng-msft
Thanks for your reply.
about the 20 and 80%, it's just example result
thanks