Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table which I have copied twice. In these tables I have a specific date column which I want to use for comparing the rows in the two tables. There is a column Index which is a one to one match for both the columns.
To consider an example:
This is a table visual that I created from the original table after selecting the year 2019 (Assume that there is one more column in the original table with year which we have not selected in the table visual)
Index | Value1 | Value2 | Value3 | Value4 |
1 | A | Germany | 22.6 | computers |
2 | B | France | 34.9 | computers |
3 | C | England | 11.89 | computers |
4 | D | USA | 55.88 | computers |
Here is an example of the table visual I get after selecting Year 2020 from the other table:
Index | Value1 | Value2 | Value3 | Value4 |
1 | A | Germany | 22.6 | computers |
2 | B | France | 34.9 | computers |
3 | C | England | 11.89 | computers |
5 | F | Poland | 46.77 | tables |
I want to disply a table which shows the rows which were new in table 2 in which I had selected 2020, so as to alert that there was a new combination in 2020 which was not present in 2019.
Index | Value1 | Value2 | Value3 | Value4 |
5 | D | Poland | 46.77 | computers |
NOTE: I would want to consider all the combinations of the columns Value1 and so on. One approach that I was thinking was to check for the new indexes present and display them. But I am not able to understand how do I disply the tnire new table with all the new values in 2020.
I even tried a measure:
RowsNotPresentInRelationAssociation2 =
VAR NewValues = EXCEPT( VALUES('relation_association_2'[UniqueColumn]), VALUES('relation_association'[UniqueColumn]) ) RETURN IF( COUNTROWS(NewValues) > 0, NewValues, "No new values found" )
Here when there are new values, how do I display them ( the entire table visual that I created above)
Solved! Go to Solution.
Hi, @ksahil16
You can try the following methods.
Measure =
Var _table=EXCEPT(VALUES(Table2[Index]),VALUES(Table1[Index]))
Return
IF(SELECTEDVALUE(Table2[Index]) in _table,1,0)
Place this measure in the 2020 table filters and set equal to 1.
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ksahil16 So generally you could create a complex selector for this. Something like the following and then you can filter Measure for 1.
Measure =
VAR __Except = EXCEPT( 'Table2', 'Table' )
VAR __Result = IF( COUNTROWS( __Except ) > 0, 1, 0)
RETURN
__Result
@Greg_Deckler thank you for the reply. I get the logic but as the logic you have applied, if the countrows is greater than 0, it returns 1 and not the entire row which is different. I want to display the entire row information. In the example above :
Index | Value1 | Value2 | Value3 | Value4 |
5 | D | Poland | 46.77 | computer |
Hi, @ksahil16
You can try the following methods.
Measure =
Var _table=EXCEPT(VALUES(Table2[Index]),VALUES(Table1[Index]))
Return
IF(SELECTEDVALUE(Table2[Index]) in _table,1,0)
Place this measure in the 2020 table filters and set equal to 1.
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
94 | |
80 | |
76 | |
65 | |
60 |
User | Count |
---|---|
108 | |
101 | |
77 | |
63 | |
61 |