AVERAGE total for measure in Power BI - dax - powerbi

I am facing with AVG total problem. I would like to use the automatic AVG total calculated from measure. I tried to fix this with HASONVALUE function but it gives me the same result as before and still wrong. Do you have any suggestions?
Measure
Table

Related

Rolling total not calculating properly in PowerBI?

I am trying to put together a rolling monthly total measure in PowerBI but my measure is not even calculating
My data is similar to below
My data
Data Model
I have made my calculation as follows:-
Rolling Annualized Revenue =
CALCULATE(
[Annual Revenue],
FILTER('Calendar Lookup',
'Calendar Lookup'[Date]
<=MAX('Calendar Lookup'[Date])))
Edit: I just realized I copied the wrong formula altogether here
For whatever this is not working at all and yields just the annual revenue not a rolling sum
Calc Result in a matrix
I determined that I needed to add the year to the row context in order for my calculation to work properly.

HASONEFILTER SUMX total not calculating correctly

I am creating a Power BI measure that sums up averages so I have used the HASONEVALUE SUMX method but the total doesn't match what the actual sum would be if you just add up the information. Here is the measure:
And here is the results:
The total shows 31,654.25 but if you add up the rows you actually get 22,962.33. I am wondering if there is something wrong with my measure or if it is an issue of me not realizing it is pulling in additional information I'm not aware of.
This is calculating the average over all of the selected contracts and then summing that same value for each selected contract. (When you define a variable, it's treated as a constant in the remainder of the measure definition.)
Adding to #Alexis Olson, the average in a row is for the group, the total count is for entire datatable.
Below table is grouped by column A. Sum of averages is not equal to total average

How to bring the measure total to rows in Power BI?

I have a measure in Power BI. How to bring the measure total to rows in power BI ?
You have to use ALL table function to compute this:
YourNewMeasure = SUMX(ALL(YourTableName),YourTableName[Quantity])
Balaji has rightly given the formula to get the total in each row, just wanted to add that now you have to create a column and use the above formula instead of a measure.

Wrong Total in Power BI

I am creating a measure, Measure = divide(sum(amount),count(task)), this is giving me incorrect total.
This is what I am getting in Power BI.
Now the result which is expected here is
Basically what I want is to get the total of the measure that I have created, Power BI is dividing the total sum with the total count.
The answer could be quite mundane.
Instead of the Measure = divide(sum(amount),count(task)) you may instead be wanting to use:
Measure = SUM(amount)
The divide(sum(amount),count(task)) measure is a longhanded way of calculating the mean (AVERAGE being the shorthand way). But what you seem to require is the SUM.

Quarterly sum of 3 month rolling average in Power BI (DAX or Power Query)

I have monthly results that I need to present as a 3 month rolling average, sometimes at a monthly level and sometimes as a sum of the 3 month rollling average for the quarter/year.
At the monthly level I've found the below formula to work well:
3-Mo Rolling Avg = CALCULATE([Market Performance], DATESINPERIOD(Calendar_Lookup[date], MAX(Calendar_Lookup[date]), -3, MONTH))
/ CALCULATE(DISTINCTCOUNT(Calendar_Lookup[Year_Month]), DATESINPERIOD(Calendar_Lookup[date], LASTDATE(Calendar_Lookup[date]), -3, MONTH))
But, when I show quarterly or annual results it shows one 3 month average instead of a sum of the 3 month averages for the period. How would you solve this?
The options I can see are:
Create a column in either Power Query or DAX that holds the 3 month averages so then I can SUM them as needed? Any advice on how to do this?
Figure out how to do a SUM of a measure. Any advice on how to do this?
Build a series of measures at the monthly, quarterly and annual level. Not a great solution as it doesn’t allow me to work fast when performing analysis because I have to be careful of pulling the right measure.
Any advice would be appreciated! Thanks!
But, when I show quarterly or annual results it shows one 3 month average instead of a sum of the 3 month averages for the period. How would you solve this?
Based on this part, it sounds like you need one of the iterator functions. In this case it sounds like a SUMX
The basic layout would be something along the lines of
Measure:= SUMX( VALUES(Calendar_Lookup[Year_Month] ) , [3-Mo Rolling Avg] )
This measure would first using VALUES function generate a distinct list of each [Year_Month]. It would then calculate using your existing [3-Mo Rolling Avg] for each [Year_Month] and then sum the results.