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,
Could someone please provide some insights.. i have a very simple measure like - Total Duration is a value that includes the numbers in hours like 3.4, 2.6 etc
Average_Total_Duration=
VAR TD= AVERAGE('Testing'[Total Duration)
Retrun TD
when i look at the data - I see something is wrong mith the number that is shown in the bar graph average line and the average that is shown in the card and the table
In the below screen shot i have a bar chart with the average measure and also i have the average line that is based on the same measure - but the table is showing 17.9 which is the value at the Total line - this is wrong because the average of those 3 numbers is 14.6 - the one in the bar graph is correct
when i calculate the average not sure why i am getting 17.9 - i have the same set of filters - visual level fitlers on both the bar graph and table - but the average shown in the table is not right - any help please
Solved! Go to Solution.
Hi Owen, thank you so much for your help and time. I really appreciate your explanation on what is going on between the 2 calculations - in the below calculation first we calculate the CALCULATE ( AVERAGE ( 'Testing'[Total Duration] ) ) this gives me the same result which gives me the same result as table 17.9
then for each unique value in the release we are calculating the average using the average x function
Average_Total_Duration=
VAR TD =
AVERAGEX (
VALUES ( 'Testing'[Release] ),
CALCULATE ( AVERAGE ( 'Testing'[Total Duration] ) )
)
RETURN
TD
thanks a lot
Hi @Raj007
The reason for the difference is that there are two different calculations happening here:
To produce the same result in both visuals, you could instead use a measure like this (I'm assuming Release is in the 'Testing' table):
Average_Total_Duration=
VAR TD =
AVERAGEX (
VALUES ( 'Testing'[Release] ),
CALCULATE ( AVERAGE ( 'Testing'[Total Duration] ) )
)
RETURN
TD
This calculates the average per Release, then averages those.
Regards,
Owen
Hi Owen, thank you so much for your help and time. I really appreciate your explanation on what is going on between the 2 calculations - in the below calculation first we calculate the CALCULATE ( AVERAGE ( 'Testing'[Total Duration] ) ) this gives me the same result which gives me the same result as table 17.9
then for each unique value in the release we are calculating the average using the average x function
Average_Total_Duration=
VAR TD =
AVERAGEX (
VALUES ( 'Testing'[Release] ),
CALCULATE ( AVERAGE ( 'Testing'[Total Duration] ) )
)
RETURN
TD
thanks a lot
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 |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |