Forum Discussion
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 area | Universal docking station |
| D32 | 3 | HR area | Universal docking station |
| D33 | 3 | Sales area | Universal docking station |
| D34 | 3 | Marketing area | Universal docking station |
| D35 | 3 | Sales | Universal docking station |
| D36 | 2 | Finance Area | Stand-up |
| D36 | 4 | Finance Area | Touchscreen |
| D37 | 1 | Finance Area | Double Screen |
| D38 | 1 | Finance Area | Double Screen |
| D39 | 3 | IT area | Universal docking station |
| D39 | 2 | IT area | Stand-up |
| D40 | 3 | IT area | Universal docking station |
| D40 | 2 | IT area | Stand-up |
| D41 | 2 | Admin Area | Stand-up |
| D41 | 3 | Admin Area | Universal docking station |
| D42 | 4 | Finance Area | Touchscreen |
| D43 | 1 | HR area | Double Screen |
| D44 | 1 | IT area | Double Screen |
| D47 | 1 | Sales area | Double Screen |
| D48 | 1 | Sales area | Double Screen |
| D49 | 1 | Sales area | Double Screen |
| D50 | 1 | Sales area | Double Screen |
| D51 | 1 | Sales area | Double Screen |
| D51 | 3 | Sales area | Universal docking station |
| D52 | 1 | Sales area | Double Screen |
| D52 | 3 | Sales area | Universal docking station |
| D53 | 2 | Marketing area | Stand-up |
Target PIE CHart
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.
6 Replies
- amitchandakSuper User
Anonymous , You have to create a new column for that
New column = if([DeskTagLabel] in {"Double Screen","Touchscreen"}, "Desk with Touch Screen and Double Screen" , "Other Desks" )
- AnonymousNot applicable
Hello Amitchandak
Thanks for your reply.I'm quite new about this. How to achive the chart target with the new column ?
thanks
- v-angzheng-msftCommunity Support
Hi, Anonymous
Can you explain how you got the pie chart above?
I can't seem to get 20% and 80% from your dataBest 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.- AnonymousNot applicable
Hi v-angzheng-msft
Thanks for your reply.
about the 20 and 80%, it's just example result
thanks
- AnonymousNot applicable
Hi V-angzheng-msft
Can you tell me how to create the table ?
thanks- v-angzheng-msftCommunity Support
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.