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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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