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
sjayawardana
Frequent Visitor

Counting rows before the selected period in slicer

Hi,

My Fact table looks like below:

Candidate Name

Status

Recruiter Full Name

Job Ad Published date

Timestamp

Position

Candidate 1

New

PB

01/01/2020

02/01/2020

Support Worker

Candidate 1

Phone screened

KW

01/01/2020

05/01/2020

Support Worker

Candidate 1

Interview complete

PB

01/01/2020

24/01/2020

Support Worker

Candidate 1

Offered role

KW

01/01/2020

22/02/2020

Support Worker

 

 

 

 

 

 

Candidate 2

New

PB

01/01/2020

03/01/2020

Admin Officer

Candidate 2

Phone screened

KW

01/01/2020

05/01/2020

Admin Officer

Candidate 2

Interview complete

PB

01/01/2020

25/01/2020

Admin Officer

Candidate 2

Offered role

PB

01/01/2020

30/01/2020

Admin Officer

 

 

 

 

 

 

 

 

 

 

 

 

Candidate 3

New

PB

01/01/2020

03/01/2020

Finance Officer

Candidate 3

Phone screened

KW

01/01/2020

05/01/2020

Finance Officer

Candidate 3

Interview complete

PB

01/01/2020

25/01/2020

Finance Officer

Candidate 3

Offered role

KW

01/01/2020

30/01/2020

Finance Officer

 

I need to calculate the following conversion rate for each position

Formula is : Conv.rate per position =candidates offered role in current period/(interview completed in current period +previous periods)

 

There is a slicer containing  the Offered role date(Date hierarchy – Year, Month)

Need the # of candidates that were Status=Interview completed before the slicer Period+Slicer period(Before selected offered Period-Month)

Need the # of candidates that were status =Interview booked before the slicer period+Slicer period

Need the # of candidates that were status=Phone Screened before the slicer period+Slicer period

Need the # of candidates that were status=Offered role within the period selected in the slicer containing  the Offered role date.

 

Candidate name is considered unique.

 

Appreciate all the help,

Thanks,

3 REPLIES 3
amitchandak
Super User
Super User

@sjayawardana , Create an independent Date table and try measures like

 

Measure =
var _max = maxx(allselected('Date') , 'Date'[Date]) // Before and selected period
var _min = minx(allselected('Date') , 'Date'[Date]) // before selected period <
return
calculate(distinctcount('Table'[Candidate]), Filter(all('Table'), 'Date'[Published date] <=_max && 'Table'[Status] = " Interview complete"))

 

Measure =
var _max = maxx(allselected('Date') , 'Date'[Date]) // Before and selected period
var _min = minx(allselected('Date') , 'Date'[Date]) // before selected period <
return
calculate(distinctcount('Table'[Candidate]), Filter(all('Table'), 'Date'[Published date] <=_max && 'Table'[Status] = " Phone screened"))

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

Could you help me with a logic change? Conv.Rate should be= Candidates with offered Roles #(all roles offered within the current month)/Candidates with Interviews completed#(only for the  offered positions in the numerator)

Thanks for the reply@amitchandak is 'Date'[Published date] the published date in the fact table?

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.

Users online (3,572)