Forum Discussion
streamly
6 years agoRegular Visitor
Compare 2 Table columns based on filter applied
Hi Everyone! I have 2 Tables that i want to compare the 2 columns based on the filter/slicer applied. Table 1: Date Name Email Task 01/25/2020 A Email A Task 1 01/25/2020 A ...
- 6 years ago
Hi streamly ,
A sample for your reference.
Measure = VAR se = SELECTEDVALUE ( 'date'[Date] ) VAR yms = YEAR ( se ) * 100 + WEEKNUM ( se ) VAR ymc = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', YEAR ( 'Table'[Date] ) * 100 + WEEKNUM ( 'Table'[Date] ) = yms ) ) RETURN IF ( ymc = BLANK (), "N", "Y" )Pbix as attached.
Ashish_Mathur
Super User
6 years ago- streamly6 years agoRegular Visitor
Hi Ashish,
Thanks for the reply. I've missed that Table 1 Dates are Week End Date it should look like this.
Table 1: Date Name Email Task 01/03/2020 A Email A Task 1 01/10/2020 A Email A Task 2 01/17/2020 C Email C Task 3 01/10/2020 B Email B Task 4 01/17/2020 B Email B Task 5 01/03/2020 C Email C Task 6 - v-frfei-msft6 years ago
Community Support
Hi streamly ,
A sample for your reference.
Measure = VAR se = SELECTEDVALUE ( 'date'[Date] ) VAR yms = YEAR ( se ) * 100 + WEEKNUM ( se ) VAR ymc = CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', YEAR ( 'Table'[Date] ) * 100 + WEEKNUM ( 'Table'[Date] ) = yms ) ) RETURN IF ( ymc = BLANK (), "N", "Y" )Pbix as attached.
- Ashish_Mathur6 years ago
Super User
Hi,
My solution should still work. If it does not, then please share that instance.