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
Team,
I Have 3 columns in table , Stations , Hour and Count as below,
Station Hour Count Average
ST1 1 AM 10 13.3
ST1 2 AM 30 13.3
ST1 3 AM 13.3
Average should be calculated by Station only eventhough the Hour column does have blank, 40/3=13.33
Kindly help
regards
M. Vijay Antony
Solved! Go to Solution.
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure. Based on station groupings, the average value is calculated.
Average =
VAR _COUNT =
CALCULATE(
SUM('Table'[Count]),
FILTER(ALL('Table'),
'Table'[Station] = MAX('Table'[Station])
)
)
VAR _STATION =
CALCULATE(
COUNTROWS('Table'),
FILTER(ALL('Table'),
'Table'[Station] = MAX('Table'[Station])
)
)
RETURN DIVIDE(_COUNT, _STATION)
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,
Write these measures
C = SUM(Data[Count])
Measure = divide(CALCULATE([C],ALL(Data[Hour])),CALCULATE(COUNTROWS(Data),ALL(Data[Hour])))
Hope this helps.
Hi,
Write these measures
C = SUM(Data[Count])
Measure = divide(CALCULATE([C],ALL(Data[Hour])),CALCULATE(COUNTROWS(Data),ALL(Data[Hour])))
Hope this helps.
For your question, here is the method I provided:
Here's some dummy data
"Table"
Create a measure. Based on station groupings, the average value is calculated.
Average =
VAR _COUNT =
CALCULATE(
SUM('Table'[Count]),
FILTER(ALL('Table'),
'Table'[Station] = MAX('Table'[Station])
)
)
VAR _STATION =
CALCULATE(
COUNTROWS('Table'),
FILTER(ALL('Table'),
'Table'[Station] = MAX('Table'[Station])
)
)
RETURN DIVIDE(_COUNT, _STATION)
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.
Thanks for the solution
Team, Can someone help me on this?
Hi @VijayAntonyM ,
Thanks for using Fabric Community.
Is this query related to DAX - Power BI?
Yes , related to DAX in Power BI desktop.
Makesure the relationship, filters should not be affected
I am moving this to Power BI forum there you can get some help.
Thank you
thanks much
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |