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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
HI All,
I need a help in comparing two cell values using AND Opertor in powerbi similar to the below image.
Formula i used in excel is: =AND(B2=B3,A2="MOD",A3="DOV"
Solved! Go to Solution.
Hi @prakash11440278,
Rows in Power BI are different from them in Excel. So we need to add an index in the Query Editor first. You can check it out in this file.
Column =
VAR currentIndex = [Index]
VAR nextUPN =
CALCULATE (
VALUES ( Table1[User Principal Name] ),
FILTER ( ALL ( 'Table1' ), Table1[Index] = currentIndex + 1 )
)
VAR nextAN =
CALCULATE (
VALUES ( Table1[Application Name] ),
FILTER ( ALL ( Table1 ), Table1[Index] = currentIndex + 1 )
)
RETURN
IF (
[User Principal Name] = nextUPN
&& [Application Name] = "MOD"
&& nextAN = "DOV",
TRUE (),
FALSE ()
)
Best Regards,
Dale
Hi @prakash11440278,
Rows in Power BI are different from them in Excel. So we need to add an index in the Query Editor first. You can check it out in this file.
Column =
VAR currentIndex = [Index]
VAR nextUPN =
CALCULATE (
VALUES ( Table1[User Principal Name] ),
FILTER ( ALL ( 'Table1' ), Table1[Index] = currentIndex + 1 )
)
VAR nextAN =
CALCULATE (
VALUES ( Table1[Application Name] ),
FILTER ( ALL ( Table1 ), Table1[Index] = currentIndex + 1 )
)
RETURN
IF (
[User Principal Name] = nextUPN
&& [Application Name] = "MOD"
&& nextAN = "DOV",
TRUE (),
FALSE ()
)
Best Regards,
Dale
Hi Prakash,
Can't download image, can you please reattach screen shot
Thanks
Just uploaded a new image. Please check again, thanks for your help.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 54 | |
| 40 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 98 | |
| 84 | |
| 35 | |
| 30 | |
| 25 |