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'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
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |