Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Avoid grouping in Pie or Donut chart

Hi,

 

I have a requirement as "I have 10 rooms as Room A, Room B, Room C etc., based on the time a person in a room, I need to calculate the time that he spent in one room and show this data in a visual as order by the time he entered into the room". I tried to bring this in pie/donut chart but it is not working. When I say not working it is actually grouping based on the room. If a person enters Room A  and spent 10 mins first and then Room B spent 2 mins and then Room C spent a min and then again the went back to Room A and spent 5 mins and then went to Room D and spent 15 mins, the chart should show in this order instead of showing the total time spent in Room A and Room B and Room C.

 

LocationTimeEnteredTimespent in mins
Room A23-03-18 11:038
Room B23-03-18 11:111
Room C23-03-18 11:122
Room D23-03-18 11:141
Room E23-03-18 11:155
Room B23-03-18 11:206
Room A23-03-18 11:2610
Room C23-03-18 11:365
Room B23-03-18 11:418
Room F23-03-18 11:493
Room G23-03-18 11:521

 

like this, it is grouping one area irrespective of time order and room.

 

Ploting_Group.JPG 

 

I want something like this in order and Room should show in single colorPlotting.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Can someone please help me to get this? Also please suggest if any other will suit for my requirement.

 

 

Thanks

Akhil

2 ACCEPTED SOLUTIONS

@Anonymous

 

See the file attached file with your sample data

 

First add these calculated columns in your Table

 

New Location =
Table1[Location] & Table1[TimeEntered]
RANK =
RANKX ( Table1, Table1[TimeEntered],, ASC, DENSE )

 

 


Regards
Zubair

Please try my custom visuals

View solution in original post

Hi @Anonymous

 

Now drag the New location and RANK fields to LEGEND

and Timespent in minutes to VALUES

AND RANK to Tooltips

 

piechart.png

Now sort by RANK Column

 

pie2.png

 


Regards
Zubair

Please try my custom visuals

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

Well, perhaps you could create a new column that concatenates Location and Time Entered and then try to set the Sort By on this new column to Time Entered. You would probably have to do that concatenation in the query however to avoid a circular reference. That being said, I have no idea if a pie chart has any concept of sorting.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler,

 

Sorry, I didn't get your point. Can you please explain more in detail?

 

Thanks

@Anonymous

 

See the file attached file with your sample data

 

First add these calculated columns in your Table

 

New Location =
Table1[Location] & Table1[TimeEntered]
RANK =
RANKX ( Table1, Table1[TimeEntered],, ASC, DENSE )

 

 


Regards
Zubair

Please try my custom visuals

Hi @Anonymous

 

Now drag the New location and RANK fields to LEGEND

and Timespent in minutes to VALUES

AND RANK to Tooltips

 

piechart.png

Now sort by RANK Column

 

pie2.png

 


Regards
Zubair

Please try my custom visuals
Anonymous
Not applicable

Thanks, @Zubair_Muhammad. It works 🙂 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.