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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
BIBRO
Frequent Visitor

Previous Year September 30th Headcount

I want my measure headcount from September 30th to show the same for every date until September 30th comes again.

DateHeadcount
9/30/2020                  5
10/1/2020                  5
10/2/2020                  5
10/14/2020                  5
 
9/28/20215
9/29/20215
9/30/202112
10/1/202112
10/2/202112
10/3/202112
 
9/28/202212
9/29/202212
9/30/202220
10/1/202220
10/2/202220
10/3/202220
1 REPLY 1
some_bih
Super User
Super User

Hi @BIBRO you can create measure Head count reset sep 30. Create Date / Calendar table and connect it with your table. Adjust Sheet2 to your table name.

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

 

Head count reset sep 30 =
VAR _current_date = MAX('Date'[Date])
VAR _sep_30 = DATE(YEAR(_current_date), 9, 30)
RETURN
    IF(_current_date <= _sep_30 && _current_date >= DATE(YEAR(_current_date)-1, 10, 1),
        CALCULATE(SUM(Sheet2[Headcount]), 'Date'[Date] = _sep_30)
    )

 

some_bih_0-1688061886081.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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