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.
I have a dax formula that is dividing the total by the count of non blank items to give me an average. I need help with the formula to get the total to be correct. Below is the dax measure: Below that is a screenshot of the numbers that are created from the measure. I added the correct amount in Column C.
Hi,
you need something like this:
Sum of Average Sales = VAR result = AVERAGEX(Sales,[Sales]) return if( HASONEVALUE(Sales[Date]), result, SUMX(VALUES(Dates[Day]), result) )
Is the "Sum of Average Sales" a new measure or an edit to my existing measure?
Your question was:
@dataSeeker wrote:I need help with the formula to get the total to be correct ... I added the correct amount in Column C.
So I showed an example of how to construct a measure that for each row calculates an Average but for totals instead of Average it calculates Sum.
(By the way, I have no idea how you happen to get 5225987.87 for the Totals)
@Sergiy wrote:So I showed an example of how to construct a measure that for each row calculates an Average but for totals instead of Average it calculates Sum.
(By the way, I have no idea how you happen to get 5225987.87 for the Totals)
Power BI calculated the 5225987.87. I tried using your formula and it doesn't sum the total. Do i want to check if there is one value for the date or day of the week?
Your sample file doesn't update the average sales when i click on a Month or Day.
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |