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
Saravanan_ameer
Frequent Visitor

Percentage for selected value

I have the table which contains columns like request status (OPEN,CLOSED,ONHOLD,CANCELLED), Request ID, Created date

 

Now i placed the slicer for the date range so if i select the date range i want to see the percentage of the completed requests ad hold requests

 

example:

 

for the last month i have total 100 tickets (70 closed,10 resolved,10 is on hold, 9 is cancelled & 1 is open status)

 

the calculation could be (70+10+9) considered as completed percenatge 89% and the open and onhold should considered as 11% 

 

Saravanan_ameer_0-1669195254511.png

 

 

Please help to aciheve it in power bi

1 ACCEPTED SOLUTION
Anonymous
Not applicable

That's cool, I think you should use switch statement rather then this nested if statement to reduce the complexity and performance of the measure like this.
 Test = switch(Request_Table[Request Status],"Closed","Completed","Resolved","Completed","Cancelled","Completed","Open or On Hold") 
OR
if(Request_Table[Request] IN { ,"Closed","Resolved","Cancelled"} ,"Completed" , "Open or On Hold")

This will improve your dax performance alot.


If my response helps you a bit then do hit the like.


View solution in original post

3 REPLIES 3
Anonymous
Not applicable

That's cool, I think you should use switch statement rather then this nested if statement to reduce the complexity and performance of the measure like this.
 Test = switch(Request_Table[Request Status],"Closed","Completed","Resolved","Completed","Cancelled","Completed","Open or On Hold") 
OR
if(Request_Table[Request] IN { ,"Closed","Resolved","Cancelled"} ,"Completed" , "Open or On Hold")

This will improve your dax performance alot.


If my response helps you a bit then do hit the like.


Anonymous
Not applicable

Hi, Actually you want to show percentages in the kpi rather than the whole total, right?

Yes I got the outpu by using the IF fucntion i created the column

 

Completed Status = IF(Request_Table[Request Status]="Closed","Completed",IF(Request_Table[Request Status]="Resolved","Completed",IF(Request_Table[Request Status]="Cancelled","Completed","Open or On Hold")))
 
After that i applied it to the Pie chart and I got the result

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.