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
AnaAlbano
Helper I
Helper I

Dates Parameters for Initial and Final Headcount

Spoiler
Spoiler
Spoiler
Spoiler
Hello Community!

I am trying to use a paramenter in my dashboard, but I am not getting the result I have. The context is: I have to show inital and final headcount and to count the number of employees, I use a column where I have "headcount", as in this table a have others groups as well, such as hires and so on.

I could create a initial and final, but when I try to use a paramenter to give user the possibility to show from when start/end, my headcount start to acumulate. These are my measures:


Initial:

CM_First Headcount =
CALCULATE(
    COUNTROWS(Combined),
    (Combined[CC_tbl_Combined_Table2]="Headcount"),
    DATESINPERIOD(dCalendar[Date],
    MIN(dCalendar[Date]),
    1,
    MONTH
    ))

Final
CM_Last Headcount2 =
CALCULATE(
    COUNTROWS(Combined),
    Combined[CC_tbl_Combined_Table2]="Headcount",
    DATEADD(
        dCalendar[Date],
        9,
        MONTH))

Does any would know how I should write to be able to use the parameter and if the person selects, for exemple: start point set/2022 and end point jan/23, to show the hires in this between?

I tryed to attach a file as reference, but I could not see the option to do it.

AnaAlbano_0-1687864752703.pngAnaAlbano_1-1687864773947.png

 

Spoiler
 

 



Thank you so much!
Ana
0 REPLIES 0

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.