Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I was stuck in comparing if the values of two adjacent rows are the same.
I have a table like below. Column A,B,C are known, and I want to calculate for Column D. If in Excel, my equation for D3 should be:
=IF($B3="A","",IF($B3="B",IF(C3=C2,"","check"),"")
Could you please help me to translate it into a PowerBI language? Thank you very much!
Solved! Go to Solution.
Hi @stellaliu
Try this column
Status =
VAR previousQuantity =
CALCULATE (
SUM ( Table1[Quantity] ),
FILTER ( Table1, Table1[#] = EARLIER ( Table1[#] ) - 1 )
)
RETURN
IF ( Table1[Types] = "B" && Table1[Quantity] <> previousQuantity, "Check" )
Hi @stellaliu
Try this column
Status =
VAR previousQuantity =
CALCULATE (
SUM ( Table1[Quantity] ),
FILTER ( Table1, Table1[#] = EARLIER ( Table1[#] ) - 1 )
)
RETURN
IF ( Table1[Types] = "B" && Table1[Quantity] <> previousQuantity, "Check" )
Hi,
Thank you very much! It definatelly makes sense!
But what if I don't have the first column with serial numbers? Are there any ways to revise the equation, or any ways to add a new column with serial numbers to my existed table?
Stella
Perfect! Thank you very much!!
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!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 49 | |
| 44 |