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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
parry2k
Super User
Super User

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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

1 ACCEPTED SOLUTION
Bjoern
Continued Contributor
Continued 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/

View solution in original post

5 REPLIES 5
vasim07
Helper I
Helper 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

 

I used the if condition for now. 

 

Thanks everyone for the solution.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Bjoern
Continued Contributor
Continued 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/

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.

 

 

parry2k
Super User
Super User

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



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.