March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 should be aggregated, but they are getting showing as average as I have selected average for no. of days.
Expected output is 6+19=25 but it is showing as average 25/2=12.50.
The values should be aggregated for same protocols that has same statuses and values should show as average for different protocols.
Overall:
When all the protocols are selected, the result should be (4+6+19+1)/3=10 but it shows as 7.50
Could someone please sugest on how to achieve this using DAX.
Attaching sample pbix file here.
Thank you,
Poojitha
Solved! Go to Solution.
@POSPOS Try this:
Measure =
VAR __Protocols = COUNTROWS(DISTINCT('Table'[Protocol]))
VAR __Sum = SUM('Table'[No. of days])
VAR __Result = DIVIDE(__Sum, __Protocols)
RETURN
__Result
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.
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.
@POSPOS Try this:
Measure =
VAR __Protocols = COUNTROWS(DISTINCT('Table'[Protocol]))
VAR __Sum = SUM('Table'[No. of days])
VAR __Result = DIVIDE(__Sum, __Protocols)
RETURN
__Result
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |