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
Jamesfindog
Helper I
Helper I

Create Measure Displaying Data from Previous Working Day

Hi All,

 

I have a Calendar table with the previous working day already implemented as a column:

Jamesfindog_0-1763720946239.png

 

I am looking to create a measure to show only a value which relates to that day, as such:

PreviousDayEmployees = CALCULATE([UniqueEmployees],
                                               applicable_date = LastWorkDay)


I also tried to create a measure to use in place of LastWorkDay, as below:

PrevWorkingDay1 = CONVERT(CALCULATE(
MAX('Calendar Master Table'[LastWorkDay]),
'Calendar Master Table'[LastWorkDay] < TODAY()), DATETIME)

 

This seems to function as intended.

 

I then created a CALCULATE statement:
PrevWorkingDayEmployees = CALCULATE(
[Unique Employees],
FILTER('MSite FILO', 'MSite FILO'[applicable_date] = [PrevWorkingDay1]))

 

However, this is returning no values.

 

Any insight?

 

Cheers!

1 ACCEPTED SOLUTION

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers?https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

View solution in original post

5 REPLIES 5
v-achippa
Community Support
Community Support

Hi @Jamesfindog,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @Ahmedx for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if your issue is resolved? 

If not, please provide sample data that covers your issue or question completely. And please show the expected outcome based on the sample data you provided.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Jamesfindog,

 

We wanted to kindly follow up to check if your issue is resolved? If not, please provide sample data that covers your issue or question completely. And please show the expected outcome based on the sample data you provided.

 

Thanks and regards,

Anjan Kumar Chippa

Ahmedx
Super User
Super User

Pls try 

PrevWorkingDayEmployees = CALCULATE(
[Unique Employees],
FILTER(ALL('MSite FILO'), 'MSite FILO'[applicable_date] = [PrevWorkingDay1]))

---------------
PrevWorkingDayEmployees = CALCULATE(
[Unique Employees],
'MSite FILO'[applicable_date] = [PrevWorkingDay1])

and you should have a data type here [applicable date] = DATETIME
I don't understand why you need to convert the data here to DATETIME.
PrevWorkingDay1 = CONVERT(...., DATETIME)
 

Hi mate,

 

Still no results (there are definitely results).

 

I have removed the conversion.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers?https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.