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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Syndicate_Admin
Administrator
Administrator

Group data according to dates

Good

I would like to group the dates according to the following grouping. how could I do it with DAX or some other functionality?

matam93_0-1647304156947.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

Please refer to my pbix file to see if it helps you.

Create columns.

 

start_ = IF(DAY('table'[Date])>=21,EOMONTH('table'[Date],-1)+21,IF(DAY('table'[Date])<21,EOMONTH('table'[Date],-2)+21))

 

 

end_ = IF(DAY('table'[Date])>=21,EOMONTH('table'[Date],0)+20,IF(DAY('table'[Date])<21,EOMONTH('table'[Date],-1)+20))

 

vpollymsft_0-1648108941067.png

 

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Syndicate_Admin ,

Please refer to my pbix file to see if it helps you.

Create columns.

 

start_ = IF(DAY('table'[Date])>=21,EOMONTH('table'[Date],-1)+21,IF(DAY('table'[Date])<21,EOMONTH('table'[Date],-2)+21))

 

 

end_ = IF(DAY('table'[Date])>=21,EOMONTH('table'[Date],0)+20,IF(DAY('table'[Date])<21,EOMONTH('table'[Date],-1)+20))

 

vpollymsft_0-1648108941067.png

 

If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Syndicate_Admin ,

in a date table , new columns 

start Date = if( day([Date]) >=21, eomonth([date],-1)+21 ,eomonth([date],0)+21 )

 

 

end Date = if( day([Date]) >=21, eomonth([date],0)+20 ,eomonth([date],1)+20 )

 

 

 

Or new table

addcolumns(generateseries(1,12,1), "Start Date" , date(2021,[Value],21) , "End Date" , date(2021,[Value]+1,20) )

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

I look good, only in some days, it is with intervals of two months.

matam93_0-1647342080074.png

The idea is, that for example the date 15/03 corresponds to the billing period 21/03 to 20/04.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.