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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
olciasandra
New Member

selected value -1 - custom periods headcount

Hi, 

 

Could you please help me with the below? 

 

I have a list of employees IDs for the last two years.  Next to that I have a custom period that we are using instead of months. I've added an index column matching the custom periods from the beginning until the end of our "custom calendar". 

 

I am trying to find a way that the customer will filter the report eg. 2018p9 and he or she will get the headcount difference 2018p9-2018p8.

 

I've added three measures:

Current Period = calculate(DISTINCTCOUNT('DATA BASE'[Employee ID]),FILTER(('DATA BASE'),'DATA BASE'[Index - YP]=SELECTEDVALUE('DATA BASE'[Index - YP])))
 
Prev.YP = CALCULATE(SELECTEDVALUE('DATA BASE'[Index - YP])-1)   
 
Previous period = calculate(DISTINCTCOUNT('DATA BASE'[Employee ID]),FILTER('DATA BASE',[Prev.YP]))
 

 It seems that previous period headcount is not counting properly, so the differenct between two periods is not correct. 

Could you please help?

 

Below the table with example. 

 

Employee IDCustom period

Index-YP

[index column]

1232018p11
1232018p22
4562018p33
7892018p44
2342018p55
1232018p66
...2018p77
..2018p88
...2018p99
..2018p1010
..2018p1111
..2018p1212
..2018p1313
 2019p114
 2019p215
 2019p316
 2019p417
 2019p518
0 REPLIES 0

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.