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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Jazzlike
New Member

Generate custom date periods based on the user input

Hi everyone!
I need to create custom date periods based on the user input. I personally was able to get to the point where I could manually generate Period Start and Period End dates within my Calendar table and then combine them in another column.

So right now in my calendar table I have a Date column and the following DAX callculated columns
16-15 Period Start 

16-15 Period Start = 
VAR pStart = DATE(YEAR('Table'[Date]),MONTH('Table'[Date]) - 1, 16)
VAR pStartSwitch = DATE(YEAR('Table'[Date]), MONTH('Table'[Date]), 16)

RETURN
    IF(
        'Table'[Date] > pStart && 'Table'[Date] < pStartSwitch,
        pStart,
        pStartSwitch
    )

16-15 Period End

16-15 Period End = 
VAR pStart = DATE(YEAR('Table'[Date]),MONTH('Table'[Date]) + 1, 15)
VAR pStartSwitch = DATE(YEAR('Table'[Date]), MONTH('Table'[Date]), 15)

RETURN
    IF(
        'Table'[Date] < pStart && 'Table'[Date] > pStartSwitch,
        pStart,
        pStartSwitch
    )

and 16-15 Period

16-15 Period = FORMAT('Table'[16-15 Period Start],"dd/mm/yyyy") & "-" & FORMAT('Table'[16-15 Period End],"dd/mm/yyyy")

 

Basically I want to be able to generate such periods based on the user input start date. I can easliy do it manually and create these columns for every single period and make a user choose between all these custom generated periods, however it seems impractical and I'm sure there should be a better option out there. I was thinking about somehow connecting Period Start and Period End to the What If parameter however I have no clue on how to impement it within my current calendar table. Any help is appreciated. Thanks in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jazzlike , No slicer parameter can not be used in table columns and table calculations.

 

You can only create measures using slicer parameters

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Jazzlike , No slicer parameter can not be used in table columns and table calculations.

 

You can only create measures using slicer parameters

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors