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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I am trying to achieve a result by comparing two rows in a column and show output based on a condition. I have shared a simple layout of the table on the below image ,
We are trying to achieve result similar to
As you can we need add a column with comparison both row data for different and If equal show "O" and not equal "X".
Thank you
Solved! Go to Solution.
Hi, @YogeshWaran2010
here is my solution:
To achieve this effect, the table is mainly converted through the pivot column, and the corresponding effect is derived by comparing it using a DAX expression.
First step, we need to import data to power BI desktop , and click transform data :
And then, we click transform >> Pivot column:
Note: We need to select the date column and then click on the pivot column
And then, values column we select amount >> click OK. And then, we click close and apply:
And then, we click table view >> new column:
Now, We enter the DAX expression:
IF('Table 1 (Tabelle1)'[4/1/2023] = 'Table 1 (Tabelle1)'[12/1/2023], "O","X")
Hi, @YogeshWaran2010
here is my solution:
To achieve this effect, the table is mainly converted through the pivot column, and the corresponding effect is derived by comparing it using a DAX expression.
First step, we need to import data to power BI desktop , and click transform data :
And then, we click transform >> Pivot column:
Note: We need to select the date column and then click on the pivot column
And then, values column we select amount >> click OK. And then, we click close and apply:
And then, we click table view >> new column:
Now, We enter the DAX expression:
IF('Table 1 (Tabelle1)'[4/1/2023] = 'Table 1 (Tabelle1)'[12/1/2023], "O","X")
Hi @Anonymous ,
Thank you for your support. I can achieve my results using these steps.
I have some doubts, if we have multiple dates then this method would not be feasible right?
If we wish implement it in the actual data where we will be required to compare multiple dates is there any work around.
Thank you
Yogesh
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |