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
SteelChampzz
Helper II
Helper II

Same Period Last Month using working days

I have a table set up where I'm using "Working days" for each month:

SteelChampzz_0-1666734607038.png

I want to be able to calculate "Same Period Last Month" while using the "working days"

And then setup the measure in a Line Chart to be able to compare each working day for each month.

 

My Working days are built into my "calendar table" already.

 

What would be the proper measures to use and how would I set this up on a line chart?

Also, can I set-up a mesure to find the different "ranges" between work days as well?

 

Thanks for any help

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @SteelChampzz ,

According to your description, I try my best to reproduce the sample.

Table:

vkalyjmsft_0-1666769081367.png

Calendar:

vkalyjmsft_1-1666769112011.png

The two tables are related with Date column. Then create a measure.

Same Period Last Month =
CALCULATE (
    MAX ( 'Table'[Value] ),
    'Calendar'[Work Day] = MAX ( 'Calendar'[Work Day] ),
    EOMONTH ( 'Calendar'[Date], 0 ) = EOMONTH ( MAX ( 'Calendar'[Date] ), -1 )
)

From the matrix visual can see, it get the correct result.

vkalyjmsft_2-1666769341801.png

You can also use a line chart to display the result.

vkalyjmsft_3-1666769420189.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @SteelChampzz ,

According to your description, I try my best to reproduce the sample.

Table:

vkalyjmsft_0-1666769081367.png

Calendar:

vkalyjmsft_1-1666769112011.png

The two tables are related with Date column. Then create a measure.

Same Period Last Month =
CALCULATE (
    MAX ( 'Table'[Value] ),
    'Calendar'[Work Day] = MAX ( 'Calendar'[Work Day] ),
    EOMONTH ( 'Calendar'[Date], 0 ) = EOMONTH ( MAX ( 'Calendar'[Date] ), -1 )
)

From the matrix visual can see, it get the correct result.

vkalyjmsft_2-1666769341801.png

You can also use a line chart to display the result.

vkalyjmsft_3-1666769420189.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

So when I write this measure it only returns 19 workings back instead of the 21 or 23 days per month

SteelChampzz_0-1666801589264.png

Did I go wrong somewhere with my measure?

Hi @SteelChampzz ,

Please try to select the option "Show items with no data".

vkalyjmsft_0-1666838846455.png

Best Regards,
Community Support Team _ kalyj

This is a great example! thank you
Also could I use this in a "Range" when it comes to working days?
For example:

Average amount between working days "1-10"

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.