Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 @v-jianpeng-msft ,
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
User | Count |
---|---|
53 | |
28 | |
19 | |
18 | |
14 |
User | Count |
---|---|
92 | |
86 | |
39 | |
23 | |
22 |