Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have written a measures by name Baseline Average and the value for each row item I am getting while putting them in a table is given below.
ID Baseline Average
A1.B1 1
A1.B2 0.58
A1.B3 0.0
--------------------------
Total Average 0.55
---------------------------
However the total Average displayed is incorrect
What I intend to do is to sumup the measure "Baseline Average" and then divide it with ID#.
Calculation would be 1.58/3 = 0.53.
How do I count the ID from the above table or there is any other way of achieving the average as 0.53.
Solved! Go to Solution.
Hi @Diptarup
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure. Calculate Baseline Average.
Baseline Average =
VAR _COUNT =
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[ID] = MAX('Table'[ID])
)
)
VAR _VALUES =
CALCULATE(
SUM('Table'[VALUES]),
FILTER(
ALL('Table'),
'Table'[ID] = MAX('Table'[ID])
)
)
RETURN DIVIDE(_VALUES, _COUNT)
You can try creating the following measure.
Average of Baseline Average =
VAR ID_COUNT = DISTINCTCOUNT('Table'[ID])
RETURN
SUMX(VALUES('Table'[ID]), [Baseline Average]) / ID_COUNT
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Diptarup
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure. Calculate Baseline Average.
Baseline Average =
VAR _COUNT =
CALCULATE(
COUNTROWS('Table'),
FILTER(
ALL('Table'),
'Table'[ID] = MAX('Table'[ID])
)
)
VAR _VALUES =
CALCULATE(
SUM('Table'[VALUES]),
FILTER(
ALL('Table'),
'Table'[ID] = MAX('Table'[ID])
)
)
RETURN DIVIDE(_VALUES, _COUNT)
You can try creating the following measure.
Average of Baseline Average =
VAR ID_COUNT = DISTINCTCOUNT('Table'[ID])
RETURN
SUMX(VALUES('Table'[ID]), [Baseline Average]) / ID_COUNT
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Diptarup
Can you please try below DAX,
Measure = DIVIDE(SUM(Yourtable[Column]),COUNT(Yourtable[ID]))
If not work, please share sample data.
Let me know if that works for you
If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.
Thanks
Pijush
Linkedin
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
91 | |
89 | |
79 | |
69 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |