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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
android1
Post Patron
Post Patron

Count point in time

Hi,

 

Trying to count the number of staff who started in each Week and Active = Y. I have their start date & a column which shows the last date in the week they started. Any idea how to achieve this?

2018-02-24 14_32_52-Untitled - Power BI Desktop.png

2 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

Hi @android1

 

Try this MEASURE

 

MEASURE =
CALCULATE ( COUNT ( TableName[Active] ), TableName[Active] = "Y" )

Regards
Zubair

Please try my custom visuals

View solution in original post

HI @android1

 

In that case you can use this MEASURE.

 

[Measure] is the measure we created above to count the employee each week

 

Cumulative Count =
SUMX (
    FILTER (
        ALLSELECTED ( TableName[Week] ),
        TableName[Week] <= SELECTEDVALUE ( TableName[Week] )
    ),
    [MEASURE]
)

Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @android1

 

Try this MEASURE

 

MEASURE =
CALCULATE ( COUNT ( TableName[Active] ), TableName[Active] = "Y" )

Regards
Zubair

Please try my custom visuals

That's great. Thank you.

 

I'd like to show a running total as well. So if I was looking at week 5 id like to see total number of staff with a start date in week 5 plus the total from the previous 4 weeks.

HI @android1

 

In that case you can use this MEASURE.

 

[Measure] is the measure we created above to count the employee each week

 

Cumulative Count =
SUMX (
    FILTER (
        ALLSELECTED ( TableName[Week] ),
        TableName[Week] <= SELECTEDVALUE ( TableName[Week] )
    ),
    [MEASURE]
)

Regards
Zubair

Please try my custom visuals

Wow, that works great. Thanks very much @Zubair_Muhammad

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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