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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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