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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Pie Chart Development in Power BI

Hi,

 

I have the below table with me and expecting a pie chart with legends and values as given below in another table.

 

I have Unique Sales ID with Order Qty and other fields. 

 

SabariPrabu_1-1601895597311.png

 

NET Price should be given as Tool Tip.

 

  1. When the Status is completed, then the Qty should be taken from "Completed Qty" and Net Price from "Net Price" and also keep Completed as one of the legend in chart.
  2. When the Status is In Progess and Defect Reason is not available, then take Qty from "In Progress Qty" and Net Price from "InProgress NET" and keep In Progress as one of the legend in chart.
  3. When the Status is In Progress and Defect Reason in available, then take the Qty from "Defect Qty" and Net Price from "Defect NET Price" and keep all defect reasons as legends in chart. 

 

I do not want many measures to be made as per the status or defect reasons, since the defect reasons may increase frequently.

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Similar to the previous formula.

Refer to the sample.

V-lianl-msft_0-1602054081912.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Similar to the previous formula.

Refer to the sample.

V-lianl-msft_0-1602054081912.png

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You can create qty column like

new column

Qty =
Switch( True(),
[Status] = "completed" , [Completed Qty],
[Status] = "In Progess" && isblank([Defect Reason]) , [In Progress Qty],
[Defect Qty]
)

 

Same way you can add Price  column

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

You have given the formula to get Qty, how are we going to handle the legends which is two columns ?

 

@amitchandak 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors