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
AmberJane
Helper II
Helper II

% Difference from two filtered fields on a column

Hi Team, 

 

I am these tickets that go through different states that you can see in the screenshot below. I want to show the % of tickets that have been closed. I think the way to do this is to create a column or measure (not sure) that takes the # of tickets and divides it by the # of tickets in the state of closed. In this specific screenshot there is 17 tickets total and 5 have been closed so I want it to show 29%. 

 

Any help is appreciated! 

 

AmberJane_0-1643995398630.pngAmberJane_1-1643995410009.png

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@AmberJane 

You can do that with a measure like this.

Closed % = 
VAR _Closed = CALCULATE ( [Work Items Count], KEEPFILTERS ( YourTable[State] = "Closed" ) )
VAR _All = CALCULATE ( [Work Items Count], REMOVEFILTERS ( YourTable[State] ) )
RETURN DIVIDE ( _Closed, _All )

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@AmberJane 

You can do that with a measure like this.

Closed % = 
VAR _Closed = CALCULATE ( [Work Items Count], KEEPFILTERS ( YourTable[State] = "Closed" ) )
VAR _All = CALCULATE ( [Work Items Count], REMOVEFILTERS ( YourTable[State] ) )
RETURN DIVIDE ( _Closed, _All )

That did the trick! I feel like there should be an easier way to accomplish this but thank you for the measure details. It has me moving forward. 

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.