The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
In below picture i wanted to compare it with prevous visit and calculate it.
Can i know the DAX calculation for it please
Example : For ID 1001 Visit2- Visit1 = 22-23 = -1.
Solved! Go to Solution.
HI @chotu27
I had some luck with this calculated column and have attached a PBIX file at the bottom.
Column = VAR VisitNumber = INT(MID('Table1'[Memory],7,99)) VAR LastValue = MAXX(FilTER('Table1','Table1'[Memory] = "Visit " & VisitNumber-1 && 'Table1'[ID] = EARLIER('Table1'[ID])),'Table1'[Value]) RETURN IF(NOT ISBLANK(LastValue),'Table1'[Value] - LastValue)
HI @chotu27
I had some luck with this calculated column and have attached a PBIX file at the bottom.
Column = VAR VisitNumber = INT(MID('Table1'[Memory],7,99)) VAR LastValue = MAXX(FilTER('Table1','Table1'[Memory] = "Visit " & VisitNumber-1 && 'Table1'[ID] = EARLIER('Table1'[ID])),'Table1'[Value]) RETURN IF(NOT ISBLANK(LastValue),'Table1'[Value] - LastValue)