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.
Hi all
I have a problem with monthly averages :
My underlying data is rolled up at a monthly level but one key parameter is the average daily volume. This is calculated on a workday basis subject to bespoke holidays so I have this in a separate table. I can easily define a a calcualted column to create the averages and this works to display the data correctly on a monthly basis but i need to be able to show the averages over quarters and years.
I have failed in linking the related number of workdays in the separate table while still calcuating the separate averages. My aim is for this as a dynamic mneasure :
Sum of attribute / sum of period workdays (from related table)
Any guidance appreciated.
THanks !
@NPH2020 Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
if you have a common date table for both, you should be able to analyze these across month ,qtr and year.
Hi
Datasets as per below :
Table 1 | ||
EOM | attribute | Value |
31-Jan | A | 118 |
31-Jan | B | 50 |
31-Jan | C | 62 |
31-Jan | D | 173 |
28-Feb | A | 179 |
28-Feb | B | 153 |
28-Feb | C | 27 |
31-Mar | B | 92 |
31-Mar | C | 40 |
31-Mar | D | 39 |
30-Apr | A | 16 |
30-Apr | B | 191 |
30-Apr | C | 12 |
30-Apr | D | 42 |
30-Apr | E | 35 |
31-May | B | 152 |
31-May | C | 190 |
31-May | D | 158 |
31-May | E | 191 |
30-Jun | A | 93 |
30-Jun | B | 61 |
30-Jun | C | 158 |
30-Jun | D | 53 |
30-Jun | E | 118 |
Table 2 | |
EOM | Work day |
31-Jan | 18 |
28-Feb | 19 |
31-Mar | 22 |
30-Apr | 18 |
31-May | 16 |
30-Jun | 22 |
31-Jul | 20 |
Many thanks
@NPH2020 , Join to a common date table and there you can have a month, qtr and year.
You can create a measure like
Divide(Sum(Tabel1[Value]), sum(Table2[Work day]))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Appreciate your Kudos.
Hi
Sadly as the mock up of the data didn't account for the fact that the attrubtes repeat in the months and so it is summing the numerator correctly but then dividing but multiple sums of the workdays, rather than one. I have tried the "distinct" function and it does not like that in sum functions, nor does it allow me to sum related columns. It works as a calculated column, but then the aggregation doesn't.
sorry for the original dataset issue....
@NPH2020 , Try
Divide(Sum(Tabel1[Value]), sumX(Summarize(Table2, Table2[EOM],"_1" ,max(Table2[Work day])),[_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 |
---|---|
13 | |
11 | |
10 | |
8 | |
6 |
User | Count |
---|---|
13 | |
12 | |
11 | |
8 | |
8 |