The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi experts
I need help to calculate the average of a column but considering just one value per category (another column)
I have a table like this
Date Value
Feb 94
Feb 94
Feb 94
Mar 96
Mar 96
If I calculate the average of the values I get 94.8.
I need a column or meassure that can give me the average of 1 value from february and 1 value from march (it always will be the same repeated value per month) so the result in this example would be=
(94+96)/2=95
Thanks in advance
Solved! Go to Solution.
@raulogv ,
Create a measure using dax as below:
Result =
CALCULATE ( AVERAGE ( Table[Value] ), DISTINCT ( Table ) )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@raulogv ,
Create a measure using dax as below:
Result =
CALCULATE ( AVERAGE ( Table[Value] ), DISTINCT ( Table ) )
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try like
averagex(SUMMARIZE(table,table[month],"_max",max(table[Value])),[_max])
In case it is the month and you have data at the date level, you can create a month in a table or join to date dimension and have moth there.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin
Use SUMMARIZE, GROUPBY or SUMMARIZECOLUMNS to first calculate the AVERAGE or AVERAGEX of each month, then take the average of those values.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
81 | |
63 | |
56 |
User | Count |
---|---|
248 | |
124 | |
111 | |
78 | |
78 |