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 two calculated values and need to have the average and delta between those.
The second value is correct but the first isn't. How can i get the average of that one?
I have this function to get the average of first and last. And a new to get the average of the average.
GemiddeldeLichaamssamenstellingEerste =
VAR selectie =
ADDCOLUMNS (
VALUES ( company[Name] ),
"EersteWaarde",
CALCULATE (
MIN ( usermeasurements[AppointmentId] ),
FIRSTDATE ( usermeasurements[OnderzoekVerichtOp] ),
FILTER (
usermeasurements,
usermeasurements[users.company.Name] = VALUES ( company[Name] )
)
)
)
VAR LS =
CALCULATE (
AVERAGE ( usermeasurements[BodyCompositionOverall] ),
TREATAS (
selectie,
usermeasurements[users.company.Name],
usermeasurements[AppointmentId]
)
)
RETURN
COALESCE ( LS / 10, 0 )
Gemiddelde van GemiddeldeLichaamssamenstellingTweede per BodyCompositionOverall =
AVERAGEX(
KEEPFILTERS(VALUES('usermeasurements'[BodyCompositionOverall])),
CALCULATE([GemiddeldeLichaamssamenstellingEerste])
)
Solved! Go to Solution.
Hi @DionTN ,
If the two values are already calculated measures you need to only do the average of both of them:
Average of two values= AVERAGE ([Value1], [Value2])
This should get the expected result since the use of metrics within another metrics forces the use of CALCULATE that will make your calculation work properly.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @DionTN ,
If the two values are already calculated measures you need to only do the average of both of them:
Average of two values= AVERAGE ([Value1], [Value2])
This should get the expected result since the use of metrics within another metrics forces the use of CALCULATE that will make your calculation work properly.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCovering 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 | |
109 | |
89 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |