Forum Discussion
POSPOS
Post Partisan
2 years agoIncorrect average using DAX
Hi All, I have a requirement to show the avergae of data for different protocols. Please find sample date below: Issue: When one protocol is selected, then the values for same statuses...
- 2 years ago
POSPOS Try this:
Measure = VAR __Protocols = COUNTROWS(DISTINCT('Table'[Protocol])) VAR __Sum = SUM('Table'[No. of days]) VAR __Result = DIVIDE(__Sum, __Protocols) RETURN __Result - 2 years ago
Hi,
Write these measures
D = SUM('Table (2)'[No. of days])Measure = AVERAGEX(VALUES('Table (2)'[Protocol]),[D])Drag the second one to the visual.
Hope this helps.
Greg_Deckler
Community Champion
2 years agoPOSPOS Try this:
Measure =
VAR __Protocols = COUNTROWS(DISTINCT('Table'[Protocol]))
VAR __Sum = SUM('Table'[No. of days])
VAR __Result = DIVIDE(__Sum, __Protocols)
RETURN
__Result