Yesterday Sales But Accounting for Weekend

Used for anything related to the new Power BI Desktop and Service tools
Posts: 32
Joined: Sat Mar 19, 2016 4:58 am
Location: Toronto, ON

Yesterday Sales But Accounting for Weekend

Postby a68tbird » Fri Mar 03, 2017 2:41 am

Hello All,
I have a client that requires daily sales reports, and so I have created a PowerBI dashboard (embedded on a backend page of their website) that gives YTD sales, as well as Yesterday's sales. But "Yesterday's" sales aren't really all that useful on a Monday morning - I'd rather that figure be Friday, Saturday and Sunday.

Yesterday measure is simply

To test for Monday, is just:

My YesterdaySales are calculated as such:

(I put that IF ISBLANK in there to prevent a big (BLANK) from showing up in the visual).

So I can put YesterdaySales into my Monday test as the FALSE result but I'm not quite sure how to sum up three previous days of sales (ie. Friday, Saturday, Sunday) when TODAY = Monday.

Thanks for any suggestions.

Posts: 999
Joined: Sun May 04, 2014 4:01 pm
Location: Sydney, Australia

Re: Yesterday Sales But Accounting for Weekend

Postby MattAllington » Sat Mar 04, 2017 3:32 pm

I suggest using custom time intelligence. You don't even need to load the weekend dates and you can add an integer ID column for each working day. E.g. The first week of dates mon to fri would be 1-5 and then the second week mon to fri would be 6-10 etc. You can then do time shifting on that column rather than the date column.

I wrote an article about it here ... beginners/
Matt Allington is Self Service BI Consultant, Trainer and Author of the Book "Supercharge Power BI".
Power BI Training

Return to “Power BI Desktop/Service”

Who is online

Users browsing this forum: No registered users and 2 guests