Forum Discussion
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
Protip: Instead of using multiple IF-clauses, you should use the switch()-function. It is pretty good explained here:
http://www.powerpivotpro.com/2015/03/the-diabolical-genius-of-switch-true/
5 Replies
- parry2kSuper User
One way could be creating a new column and use if condition. wondering if there is another smart way to do so?
- jgraltonRegular Visitor
Create another table "Days Passed" listing number of days. Relationship should auto detect, if not select "Days Passed" as a relationship.
Should work.
- vasim07Helper I
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
- parry2kSuper User
I used the if condition for now.
Thanks everyone for the solution.
- BjoernContinued Contributor
Protip: Instead of using multiple IF-clauses, you should use the switch()-function. It is pretty good explained here:
http://www.powerpivotpro.com/2015/03/the-diabolical-genius-of-switch-true/