Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello!
I have a measure that calculates sales per business day for each month. It just divides the total sales for the month by the number of business days in the month. Here is the DAX for that measure:
Sales/Bus Day =
DIVIDE([Sales, All Channels], CALCULATE(
SUM('Date Table'[Workday Flag]),
'Date Table'[Workday Flag] IN { 1 }
))
The expression,
CALCULATE(
ensures that I'm measuring sales per business day and not simply sales per day.
This works great if the month is already finished, but for the current month, it shows a very low figure, because not all the sales for the month have happened yet. How can I make a single measure that works both for months that have finished and for the current month?
Solved! Go to Solution.
@pwe5000 , Try a measure like
Sales/Bus Day =
DIVIDE([Sales, All Channels], CALCULATE(
SUM('Date Table'[Workday Flag]),
filter('Date Table','Date Table'[Workday Flag] IN { 1 } && 'Date Table'[Date] < today())
))
or
calculate(averageX(values('Date Table'[Date]),[Sales, All Channels]) ,'Date Table'[Workday Flag] IN { 1 } )
@pwe5000 , Try a measure like
Sales/Bus Day =
DIVIDE([Sales, All Channels], CALCULATE(
SUM('Date Table'[Workday Flag]),
filter('Date Table','Date Table'[Workday Flag] IN { 1 } && 'Date Table'[Date] < today())
))
or
calculate(averageX(values('Date Table'[Date]),[Sales, All Channels]) ,'Date Table'[Workday Flag] IN { 1 } )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
17 | |
15 | |
15 | |
12 | |
10 |