Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everyone,
I want to produce a function that will make me an average of the number of users each month of all days of the week (Sunday until Saturday)
For example:
The average of Sundays in July is X
The average of Mondays in July is y
The average of Tuesdays in July is Z
Thanks!
Solved! Go to Solution.
@dolevh So, have to make some assumptions because no sample source data, but perhaps something like:
Measure =
VAR __Date = MAX('Table'[Date)
VAR __Weekday = WEEKDAY(__Date)
VAR __Month = MONTH(__Date)
VAR __Year = YEAR(__Date)
VAR __Table = FILTER(ALL('Table'),[Year]=__Year && [Month]=__Month && [Weekday]=__Weekday)
RETURN
DIVIDE(
SUMX(__Table,[Value]),
COUNTROWS(__Table),
0
)
@dolevh So, have to make some assumptions because no sample source data, but perhaps something like:
Measure =
VAR __Date = MAX('Table'[Date)
VAR __Weekday = WEEKDAY(__Date)
VAR __Month = MONTH(__Date)
VAR __Year = YEAR(__Date)
VAR __Table = FILTER(ALL('Table'),[Year]=__Year && [Month]=__Month && [Weekday]=__Weekday)
RETURN
DIVIDE(
SUMX(__Table,[Value]),
COUNTROWS(__Table),
0
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
74 | |
63 | |
39 | |
38 |