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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors