Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I am calculating average of sum per period.
In visual I see this:
Two visuals and averages match, that correct. But when I select for example other case, for example,
Average 670.51
And in another visual is:
So seems that averages don't match in this case. One assumption that average becomes wrong when period is not full year, like several months, etc.
Average in table is getting like this:
Date filter.
So how to solve my issue?
@Analitika , in your measure, you have this:
_Date[Date].[Month]What is the ".[Month]" part? When I use this in a measure, I get an error. Do you have a date hierarchy set up on your _Date.[Date] field?
@Analitika , Do both the Chart visual and the Table visual use the same measure for the Average?
Do both the Chart visual and the Table visual have the same filters?
Yes date hierarchy created. Red line in visual is getting by average function. second visual use measure. Filters are same.
Average in first visual
@Analitika , In the Chart visual the Average is 670.51. The chart is showing only eight months. If you multiply 670.51 by 8 you get a total amount of 5364.08.
If you divide 5364.08 by 12 you get 447.01, which is the average in the Table visual.
So it looks like your data only has values for 8 out of the 12 months, and the Chart Average function is averaging over only those 8 months.
Your measure [selected month] is counting all the months in the slicer selected regardless if there is any Amound data for those months.
I would guess that in the first example where both visuals show the same average of 299.82 then there is Amount data for each of the 12 months.
I would suggest that you create a measure that gives you the desired output in all cases, and then use that measure in both the Chart and Table visuals.
Ok, so how to fix my measure, I have no idea. I also changed measure to this measure:
@Analitika , try changing the measure to DISTINCTCOUNT the month field from the table where the [sum] data comes from instead of the _Date table.
Yes, I made distinctcount(date[month]) but getting wrong if I select two or more years in date slicer.
@Analitika , could you please post the DAX for the [sum] measure?
And what is the field in the fact table that has a relationship to the -Date table?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.