Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Everyone!
I have 2 Tables that i want to compare the 2 columns based on the filter/slicer applied.
Table 1:
Date | Name | Task | |
01/25/2020 | A | Email A | Task 1 |
01/25/2020 | A | Email A | Task 2 |
01/26/2020 | C | Email C | Task 3 |
01/25/2020 | B | Email B | Task 4 |
01/25/2020 | B | Email B | Task 5 |
01/26/2020 | C | Email C | Task 6 |
Table 2:
Name | |
A | Email A |
B | Email B |
C | Email C |
I have Date slicer and want to check if Name in Table 2 has entry Table 1 based on the Date slicer
Applied Date slicer/filter: 01/26/2020 in Table 1
Expected Result:
Name | with Task (Y/N) | |
A | Email A | N |
B | Email B | N |
C | Email C | Y |
If this is not possible, is there any way to get the same result. Thanks!
Solved! Go to Solution.
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.
Hi,
You may download my PBI file from here.
Hope this helps.
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 | 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 |
Hi,
My solution should still work. If it does not, then please share that instance.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |