Forum Discussion

parry2k's avatar
parry2k
Super User
10 years ago
Solved

How to group data?

I have data as listed below and would like to put a pie graph showing data in two group

 

amt pending for days passed less than equal to 5 days

amt pending for days passed more than 5 days

thanks in advance

 

bi image.PNG

5 Replies

  • One way could be creating a new column and use if condition. wondering if there is another smart way to do so?

  • jgralton's avatar
    jgralton
    Regular Visitor

    Create another table "Days Passed" listing number of days.  Relationship should auto detect, if not select "Days Passed" as a relationship.

     

    Should work.

     

     

  • Untested but should work.

    From Ribbon - New Measure.

     

     

    lessthan5days = CALCULATE(SUM(TABLENAME[PRINCIPLE AMOUNT PENDING]),TABLENAME[DAYS PASSED] <= 5)
    morethan5days = CALCULATE(SUM(TABLENAME[PRINCIPLE AMOUNT PENDING]),TABLENAME[DAYS PASSED] > 5)

     

    Now, use both this metrics to plot a pie chart.

     

    Regards,

    Vasim Shaikh