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 September 15. Request your voucher.

Reply
nailed
Frequent Visitor

Get count as per status date column

Hi everyone,

 

I'm trying to achive Count as per status date column like (Submission Date, Rejected Date, Approved Date, and Live Date).

Employee Tracker.pbix 

 

The main goal is to see how much total approved each employee submits and the variance will be calculated based on the total approved - target per employee and also filtered by month.

 

As for the rules, every live date is definitely approved. And there are cases where there are rejected dates and approved dates in the same row, then it is counted as approved not in rejected. The result is a dashboard filtered by month, by providing the headcounts, status count (submission, rejected, approved, and live)

 

Can you explain logically and guide me to successfully display.

 

PBI attached

 

Thank you

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@nailed , Two if you dates approved and rejected has some space or zero size text. Clean those in power query to make sure date type is date.

 

Two ways to deal with these measures. Based on their on date

 

Approved = calculate(countrows(compile), userelationship('Date'[Date], compile[Approved Date]))
Rejected = calculate(countrows(filter(compile,isblank(compile[Approved Date]) )), userelationship('Date'[Date], compile[Rejected Date]))
Submission = calculate(countrows(compile), userelationship('Date'[Date], compile[Submission Date]))

 

 

// based on submission date , assuming that is default active join
Approved = calculate(countrows(filter(compile,[status]= "Approved"))
Rejected = calculate(countrows(filter(compile,[status]= "Rejected"))
Submission = calculate(countrows(filter(compile,[status]= "Submission"))

 

Not you can use common date (joined with target too) and employee to analyze target together

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@nailed , Two if you dates approved and rejected has some space or zero size text. Clean those in power query to make sure date type is date.

 

Two ways to deal with these measures. Based on their on date

 

Approved = calculate(countrows(compile), userelationship('Date'[Date], compile[Approved Date]))
Rejected = calculate(countrows(filter(compile,isblank(compile[Approved Date]) )), userelationship('Date'[Date], compile[Rejected Date]))
Submission = calculate(countrows(compile), userelationship('Date'[Date], compile[Submission Date]))

 

 

// based on submission date , assuming that is default active join
Approved = calculate(countrows(filter(compile,[status]= "Approved"))
Rejected = calculate(countrows(filter(compile,[status]= "Rejected"))
Submission = calculate(countrows(filter(compile,[status]= "Submission"))

 

Not you can use common date (joined with target too) and employee to analyze target together

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you, you're life saver! I want to ask again to you, how to returns 0 instead (Blank) based on your measure?

 

Thank you

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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