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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.