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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
SerenaFan93
Frequent Visitor

Running Total Blocks of 6-month Periods

Hello! I'm trying to create a calculated column that keeps a running total of blocks of 6-month periods. For example, given the data below, I would want the dates to be formatted as such:

 

03/15/2020 - 08/19/2020 – 1

12/15/2020 – 05/10/2021 – 2

11/29/2021 – 04/27/2022 – 3

 

Any ideas? Thank you!

 

Event Date

8/12/2020

8/19/2020

12/15/2020

2/4/2021

4/17/2021

5/10/2021

11/29/2021

3/2/2022

3/6/2022

4/26/2022

4/27/2022

3 REPLIES 3
SerenaFan93
Frequent Visitor

Thank you v-binbinyu-msft! I understand how you set this up, but this was an example of one customer. The dates will differ for each customer - any thoughts on how this could be dynamic?

Anonymous
Not applicable

Hi @SerenaFan93 ,

So far, to my knowledge, this may not be fully dynamic.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @SerenaFan93 ,

Please try to create a new column with below dax formula:

Column =
VAR _date = [Event Date]
VAR tmp1 =
    CALENDAR ( DATE ( 2020, 3, 15 ), DATE ( 2020, 8, 19 ) )
VAR tmp2 =
    CALENDAR ( DATE ( 2020, 12, 15 ), DATE ( 2021, 5, 10 ) )
VAR tmp3 =
    CALENDAR ( DATE ( 2021, 11, 29 ), DATE ( 2022, 4, 27 ) )
RETURN
    SWITCH ( TRUE (), _date IN tmp1, 1, _date IN tmp2, 2, _date IN tmp3, 3 )

vbinbinyumsft_0-1686555052200.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.