Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I illustrated in excel below I need changed in my power bi file.
Currently I calculate workdays with the following calc: Workday = IF(WEEKDAY([Date],2)>5,0,1)
To get running total workdays:
RWkday = CALCULATE(SUM('Date'[Workday]),FILTER(ALL('Date'),'Date'[MYR]=EARLIER('Date'[MYR])&&'Date'[Date].[Day]<=EARLIER('Date'[Date].[Day])))
To get total workdays in month:
MWkday = CALCULATE(MAX('Date'[RWkday]),FILTER(ALL('Date'),'Date'[MYR]=EARLIER('Date'[MYR])))
MYR is just Month Year
So Above, Avg Sales by Business days is: Sales/RWKday (Business Days)
Run Rate is: Avg Sales by Business Days * MWkday (total business days in month)
The photo above is an example of looking at a month in process. So in December there have been a total of 8 business days so far. The date connected to when a sale occurs is a transaction date. Not every day does a vendor have a transaction so I have created a calendar table that has a relationship with the transaction date. The reason why there is a 3 for Vendor C and a 6 for Vendor D for business days so far (RWkday) is because those vendors must have only had 3 and 6 days in the month that actually had a transaction date. I would like the running business days RWkday to be agnostic of how many transaction dates a vendor may have in a month.
In yellow is what I would like to change my Power BI file to correctly calculate. So as you can see Vendor C and Vendor D would have 8 business days in total so far regardless of there 3 and 6 transaction dates that have happened.
What have I done wrong here, or what can I change to get the desired 8 business days for every vendor regardless of # of transaction dates??
Thank you so much in advance, I've worked on this so much that I'm unable to look at this in a new way.
HI @Anonymous,
Can you please provide some sample data to test?
Regards,
Xiaoxin Sheng
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
37 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |