Power BI - Previous Workday's Performance

Buck2919

New Member
Joined
Jan 7, 2020
Messages
16
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi,

I'm pretty new to PowerBI so please bear with me.

I've created a report and i want a simple matrix to show the previouse days performance.

I have created two measures

1) Total items worked - Total Classified = COUNTx(TOM_DATA,TOM_DATA[Investigation Classification])
2) Previous Days perfomance - Previous Day Classified = CALCULATE([Total Classified],DATEADD(Rolling_Calendar[Date],-1,DAY))

However my matrix has gaps in it.

Simply i want to return Fridays performance next to Monday's performance in my Matrix.

1588606868226.png


Please can anybody help!

Thanks in advance Michael
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Michael,

Maybe try something like that -

Rich (BB code):
Previous Day Classified = 
    var MaxDate = MAXX(FILTER(ALL(Rolling_Calendar), Rolling_Calendar[Date] < SELECTEDVALUE(Rolling_Calendar[Date])), Rolling_Calendar[Date])
return
    CALCULATE(
        [Total Classified],
        FILTER(ALL(Rolling_Calendar), Rolling_Calendar[Date] = MaxDate)
    )
 
Upvote 0
Hi JustynaMK

Thank you so much for your response.

However it doesn't quite solve my problem. - The second column below is the returned data from your code and doesn't move Friday's classified DATA to the next working day i.e. Monday.

We don't work weekends to i need to exclude them and show the previous working day in the matrix - Example - Fridays 27th March's data in the first column should show in the second column on Monday 30th March and not in Saturday 28th March.

1588669253171.png


Thank you so much for you help i really appriciate it and hopefully you can find me a solution.

Kind Regards
Michael
 
Upvote 0
Ahh of course! ?‍♀️

How about this one -

Rich (BB code):
Previous Day Classified = 
    var MaxDate = MAXX(
        FILTER(ALL(Rolling_Calendar), Rolling_Calendar[Date] < SELECTEDVALUE(Rolling_Calendar[Date]) && NOT ISBLANK([Total Classified])), 
        Rolling_Calendar[Date])
return
    IF([Total Classified] <> 0,
    CALCULATE(
        [Total Classified],
        FILTER(ALL(Rolling_Calendar), Rolling_Calendar[Date] = MaxDate)
    ))

1588674046935.png
 
Upvote 0

Forum statistics

Threads
1,223,793
Messages
6,174,635
Members
452,575
Latest member
Fstick546

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top