Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I am trying the build a sales report and for one metric I would like to show the average tonnes sold per day. In order to do this, I need to embed a dynamic calculation in my calendar table that count the amount of working days (mon-fri) past in the current month. This calculation needs to reset itself every single month. On top of that, I would like to save the total working days in the month when the month has completed.
I cannot wrap my head around this and hope that one of you can help me out.
Thanks
Solved! Go to Solution.
[# Working Days] = // calculated column
var Today_ = TODAY()
var CurrentMonth = 'Calendar'[Year-Month]
var Result =
SUMX(
filter(
'Calendar'
// This filters to the whole month that
// is on the current line.
'Calendar'[Year-Month] = CurrentMonth
// This one says not to count anything
// that is in the future.
&& 'Calendar'[Date] <= Today_
),
'Calendar'[Is working day]
)
RETURN
// Add 0 to Result if you want to see
// 0 instead of BLANKS.
Result
Fantastic! That did the job. Thanks heaps
[# Working Days] = // calculated column
var Today_ = TODAY()
var CurrentMonth = 'Calendar'[Year-Month]
var Result =
SUMX(
filter(
'Calendar'
// This filters to the whole month that
// is on the current line.
'Calendar'[Year-Month] = CurrentMonth
// This one says not to count anything
// that is in the future.
&& 'Calendar'[Date] <= Today_
),
'Calendar'[Is working day]
)
RETURN
// Add 0 to Result if you want to see
// 0 instead of BLANKS.
Result
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |