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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Solved! Go to Solution.
Hi @Pikachu-Power
Try this measure:
Difference =
Var _Item = FIRSTNONBLANK('Table'[ColumnX],"")
Var _ValueX = sumx(filter('Table','Table'[ColumnX]=_Item),'Table'[ValueX])
Var _ValueY = sumx(filter(all('Table'),'Table'[ColumnY]=_Item),'Table'[ValueY])
return
_ValueX-_ValueY
The output will be as follow:
Table I used in Power BI:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @Pikachu-Power
Try this measure:
Difference =
Var _Item = FIRSTNONBLANK('Table'[ColumnX],"")
Var _ValueX = sumx(filter('Table','Table'[ColumnX]=_Item),'Table'[ValueX])
Var _ValueY = sumx(filter(all('Table'),'Table'[ColumnY]=_Item),'Table'[ValueY])
return
_ValueX-_ValueY
The output will be as follow:
Table I used in Power BI:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Both cases dont work yet. I suppose because i also have filtered Tabel1[Year] = 2019 that get ignored through the ALL command?
@Vahid With Table[ValueX] you mean Table[CountX]? My measure before?
I modivied ALL(Table) to ALLEXCEPT(Table, Table(Year)) and it seems to work 🙂
maybe try
DIFF = COUNT(Tabel1[ColumnX])- CALCULATE(COUNT(Tabel1[ColumnY]), FILTER(ALL(Tabel1), Tabel1[ColumnY] =MAX(Tabel1[ColumnX]))
Proud to be a Super User!