The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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!