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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Current & previous months

Hi All,

Does anyone know how to find current period and previous period total sales  by making your data table autoupdate? 

For example, the first pay period starts from 1st to 15th of each month and second pay period is from 16th to EOMONTH. This means that the "CURRENT MONTH" can fall into one of two pay periods. 

I need my date table to identify whether the pay period is in P1 or P2, and accordingly assing "CURRENT MONTH" label. The month prior to "current month' will have label "PREVIOUS MONTH".

Cannot figure out how to do this. Is anyone able to help?

Thanks all

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

My understanding is that you need something like below.

pay period = 
IF( DAY( 'Table'[Date] ) <= 15, "P1", "P2" )

If not please please can you create a sample with the outcome that you are expecting.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

2 REPLIES 2
v-diye-msft
Community Support
Community Support

Hi @Anonymous ,

 

If above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

My understanding is that you need something like below.

pay period = 
IF( DAY( 'Table'[Date] ) <= 15, "P1", "P2" )

If not please please can you create a sample with the outcome that you are expecting.

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.