Forum Discussion

CraigC's avatar
CraigC
Helper I
9 years ago
Solved

Create a pie chart from counting values in different ranges

 Hi Everyone

 

I need to create a pie chart from the resolution times column.

 

I have calculated the resolution time from open time to close time using the following formula:

Resolution Time = [CLOSEDATETIME]-[OPENDATETIME]

 

It is in a fixed decimal number format set to dont summarize.

 

Basically i want to be able to have a pie chart showing the percentage of tickets resolved in under 15 minutes, then 15 to 30 minutes, then 30 to 60 minutes then over 1 hour

 

Below i used this formula to try and switch values but cant do between 15 and 30 minutes (0.25 and 0.5) so dont think that will work.

 

Any ideas how to do this pie chart?

 

 

  • I'll skip my many personal objections to the pie chart for now...  but I think this was what you were going for...?  I changed your 'Under 15 Min' to '0-15 Min' to make sorting easier...  Hope this helps, FOrrest

     

    Graph = IF(Table1[Resolution Time] < 0.25,"0-15 Min",
    IF(Table1[Resolution Time] >= 0.25 && Table1[Resolution Time] < 0.5,"15-30 Min",
    IF(Table1[Resolution Time] >= 0.5 && Table1[Resolution Time] < 0.75,"30-45 Min",
    IF(Table1[Resolution Time] >= 0.75 && Table1[Resolution Time] < 1, "45-60 Min",
    IF(Table1[Resolution Time] >= 1,"Over 1 Hour","Error")))))

     

3 Replies

  • fhill's avatar
    fhill
    Resident Rockstar

    I'll skip my many personal objections to the pie chart for now...  but I think this was what you were going for...?  I changed your 'Under 15 Min' to '0-15 Min' to make sorting easier...  Hope this helps, FOrrest

     

    Graph = IF(Table1[Resolution Time] < 0.25,"0-15 Min",
    IF(Table1[Resolution Time] >= 0.25 && Table1[Resolution Time] < 0.5,"15-30 Min",
    IF(Table1[Resolution Time] >= 0.5 && Table1[Resolution Time] < 0.75,"30-45 Min",
    IF(Table1[Resolution Time] >= 0.75 && Table1[Resolution Time] < 1, "45-60 Min",
    IF(Table1[Resolution Time] >= 1,"Over 1 Hour","Error")))))

     

    • CraigC's avatar
      CraigC
      Helper I

      I know, but people like the "pretty wheel".

       

      Worked perfectly! Thank you:)

    • PieroC's avatar
      PieroC
      New Member

      Hi there Fhill.

       

      I have a similar problem but my data have some "distinct count" issue on it. My sales are scattered in quantities per net prices and don't know how to solve it. 


      See? I have 3 distinct amounts for Ticket (numero documento) No 1 and also on No 10


      I managed it on Power Pivot but just can't on Power Bi as you can see on shots I now add.


      I need a Dax formula for the ticket ranges on a ring chart like that.

       

      Thanks in advance.
      Appreciate the help!