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
jackyot
Regular Visitor

How to count selectively

HI Experts

 

Newbie seeking help.......... 😅

 

I am looking to build a dashboard with use-case based on a legacy ticket management system. The table is one big flat file of data.

 

Basically the table an 'open date' and 'closed date' which will be the centre of this use-case.

On my dashboard I need to display 'Open Backlog' - The number of ticket that is still not closed given a specific date. If a period is given (as I uses a timeline slicer), the 'Open Backlog' needs to be based on the last day of the period specified.

 

Any hints would be very appreciated! I'm pulling my hair to get this idea around but i'm stuck and unable to go further than this.

 

 

 

 

 

 

 

 

 

2 REPLIES 2
amitchandak
Super User
Super User

@jackyot , refer to my blog on a similar topic if that can help

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

there are few changes to attaching the latest file after signature

Hi Amit

Thanks for the reply! I had a look at it and I think the most relevant here for me would be the fomula

Last Period Employee = 
var _min_date = minx(all('Date'),'Date'[Date])
var _Expression=if(ISFILTERED('Date'[Month Year]),maxx('Date',DATEADD('Date'[Date],-1,MONTH)),maxx('Date',DATEADD('Date'[Date],-1,YEAR)))
Return
 CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=_Expression && Employee[Start Date]>=_min_date && (ISBLANK(Employee[End Date]) || Employee[End Date]>_Expression)),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))

 

Can you give me a bit more explanation on the logic behind this calculation? I imagine this is a Measure placed on Employee table?

 

 

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.