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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TheKiltedGolfer
Helper III
Helper III

Calculated column using and/or within an If statement

I need assistance on how to do the following in Power BI.

 

Premise:  I have a query called Opened to Closed/Resolved (snapshot attached) that has the following columns: Ticket Number, Ticket State, Opened Date, Opened by, Closed Date, Closed by, Resolved Date, and Resolved by.  The same ticket may be listed more than once depending upon who opens, closed, and/or resolves it.

 

What I would like to do and need assistance with:

1.  I want to create a calcuated column that reports the number 1 if the ticket, that is opened by a certain group of people, is also either closed by OR resolved by someone from that same group of people. Otherwise report the number 0.  My data is filtered so it will either have the name of the person in my special group or be null if it does not.  This will tell me how many tickets opened by certain group of people are also closed/resolved by the same group.  I cannot get an IF, with AND/OR statement within it, to work.

 

2.  Once I the calculated column requested in step 1 then I would like to produce a "card" visual that will show the % of tickets opened by the group that are also closed/resolved by that group.  This should be the the sum of the calculated column/the sum of unique tickets in the Ticket Number column.  But how do I do this and make it into a card visual?

 

3.  Another card visual, very similar to #2, I want to create is the number of tickets open, closed, and/or resolved per person in this group.  This would be the unique Ticket Number/ unique count of (Opened by, Closed by, Resolved by).  How in the world can I do this in Power BI?

 

I can visualize all of this in my head by have no idea how to translate it into Power BI visual.

 

THANK YOU !!

 

 

Open to Closed_Resolved.png

 

 

 

2 REPLIES 2
TheKiltedGolfer
Helper III
Helper III

Still need expert advise on my original first question:

 

What I would like to do and need assistance with:

1.  I want to create a calcuated column that reports the number 1 if the ticket, that is opened by a certain group of people, is also either closed by OR resolved by someone from that same group of people. Otherwise report the number 0.  My data is filtered so it will either have the name of the person in my special group or be null if it does not.  This will tell me how many tickets opened by certain group of people are also closed/resolved by the same group.  I cannot get an IF, with AND/OR statement within it, to work.

 

Thanks !!

TheKiltedGolfer
Helper III
Helper III

I am not sure if this makes sense to what I am trying to get but I did the following and got a result:

  1. Created new measures from the same field:  Distinct Closed, Distinct Open, Distinct Resolved, Distinct Tickets, Distinct Dates
  2. Created a new measure from a different field: Distinct Names
  3. Then created an additional new measure, in field from step 1, based on steps 1 & 2 called Tickets per Associate per Day with the formula: TicketsperAssocperDay = ([Distinct Tickets]/('Unpivot by Name Total Opened/Closed/Resolved Tickets'[Distinct Names])/[Distinct Dates])

Does what I did make any sense to discovering Tickets per Associate per Day? Leadership may want to see if this value increases, or reach a threshold, when considering hiring additional people.  Please let me know if this makes any sense or if there is a better way of doing this.  Very new to DAX and Power BI.

 

Thanks !!!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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