March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all, I'm having trouble calculating an average of a measure, and after trawling the forums for an hour or two unsuccessfully I thought someone might be able to assist.
I have an SQL query pulling data into Power BI desktop from a shipping database and the following measure which gives me the number of vessel movements where the movement type is not X:
Vessel Movements = CALCULATE(COUNT('Tug Movements'[VM_MovementType]), 'Tug Movements'[VM_MovementType]<>"X")
I have matrix visualisation that is displaying this by month (columns) and financial year (rows) where each financial year runs Oct - Sep. I'd like to include an average by Month by FY, similar to the Total, which gives me the average (for example) of each October across all the FY. This is to measure seasonality. Can anyone assist, please?
Solved! Go to Solution.
@Anonymous,
Modify your measure like below:
Vessel Movements = CALCULATE(COUNT('Tug Movements'[VM_MovementType]), 'Tug Movements'[VM_MovementType]<>"X") / DISTINCTCOUNT('Tug Movements'[Financial Year])
Appendix attached.
Regards,
Jimmy Tao
Added screenshot as below
Here is what I currently have in PBi. Want to be able to use my Vessel Movement measure to calculate an average by month, grouped by FY (eg instead of the total, 434, for October, I'd like to get the average as another measure that I can use in a graph visualisation as well as another table or matrix). FY is a calculated column from my date table.
@Anonymous,
Modify your measure like below:
Vessel Movements = CALCULATE(COUNT('Tug Movements'[VM_MovementType]), 'Tug Movements'[VM_MovementType]<>"X") / DISTINCTCOUNT('Tug Movements'[Financial Year])
Appendix attached.
Regards,
Jimmy Tao
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |