Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hello community,
I have problems calculating an availability % for my production. Here is my formula at the moment:
Solved! Go to Solution.
Hi @DGodQc ,
You could add an index column with query editor. Then use RANKX() function to create a rank column.
rank =
RANKX (
FILTER ( testTable, testTable[ID] = EARLIER ( testTable[ID] ) ),
testTable[Index],
,
ASC,
DENSE
)
Then sum the value where [rank]=1.
Measure =
CALCULATE (
SUM ( testTable[value] ),
testTable[rank] = 1,
ALLEXCEPT ( testTable, testTable[ID] )
)
Hi @DGodQc ,
You could add an index column with query editor. Then use RANKX() function to create a rank column.
rank =
RANKX (
FILTER ( testTable, testTable[ID] = EARLIER ( testTable[ID] ) ),
testTable[Index],
,
ASC,
DENSE
)
Then sum the value where [rank]=1.
Measure =
CALCULATE (
SUM ( testTable[value] ),
testTable[rank] = 1,
ALLEXCEPT ( testTable, testTable[ID] )
)
It seems very similar to the sum of the Avg problem. Please refer
https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!