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.
Trying to create a slicer that can dynamically cut accross multiple date fields in the same table at the same time. Is this possible? I heard others mention the userealionship function but I'm not sure that will work in this case. Not having more than one relationship active makes it seem nearly impossible. Here are what my realtionships look like. All link back to the date primary key. Any help would be appreciated. Thanks.
Solved! Go to Solution.
Hi @mitchmoore2,
Current power bi only support one active relationship each table. For your requirement, I'd like to suggest you to add a measure to check the multiples fields and use the measure to filter visual.
Sample:
Measure formula.
Check Tag(OR) = VAR selected = IF ( HASONEVALUE ( 'CALENDAR'[Date] ), VALUES ( 'CALENDAR'[Date] ), BLANK () ) RETURN IF ( MAX ( 'Test Tabel'[Date1] ) = selected || MAX ( 'Test Tabel'[Date2] ) = selected || MAX ( 'Test Tabel'[Date3] ) = selected || MAX ( 'Test Tabel'[Date4] ) = selected || MAX ( 'Test Tabel'[Date5] ) = selected || MAX ( 'Test Tabel'[Date6] ) = selected || MAX ( 'Test Tabel'[Date7] ) = selected, "Y", "N" ) Check Tag(AND) = VAR selected = IF ( HASONEVALUE ( 'CALENDAR'[Date] ), VALUES ( 'CALENDAR'[Date] ), BLANK () ) RETURN IF ( MAX ( 'Test Tabel'[Date1] ) = selected && MAX ( 'Test Tabel'[Date2] ) = selected && MAX ( 'Test Tabel'[Date3] ) = selected && MAX ( 'Test Tabel'[Date4] ) = selected && MAX ( 'Test Tabel'[Date5] ) = selected && MAX ( 'Test Tabel'[Date6] ) = selected && MAX ( 'Test Tabel'[Date7] ) = selected, "Y", "N" )
Create table visual.
Result:
Notice: Check Tag(OR) show 'Y' when one of the date fields equal to selected calendar date; Check Tag(AND) show 'Y' when all date fields are equal to selected calendar date.
Regards,
Xiaoxin Sheng
Hi @mitchmoore2,
Current power bi only support one active relationship each table. For your requirement, I'd like to suggest you to add a measure to check the multiples fields and use the measure to filter visual.
Sample:
Measure formula.
Check Tag(OR) = VAR selected = IF ( HASONEVALUE ( 'CALENDAR'[Date] ), VALUES ( 'CALENDAR'[Date] ), BLANK () ) RETURN IF ( MAX ( 'Test Tabel'[Date1] ) = selected || MAX ( 'Test Tabel'[Date2] ) = selected || MAX ( 'Test Tabel'[Date3] ) = selected || MAX ( 'Test Tabel'[Date4] ) = selected || MAX ( 'Test Tabel'[Date5] ) = selected || MAX ( 'Test Tabel'[Date6] ) = selected || MAX ( 'Test Tabel'[Date7] ) = selected, "Y", "N" ) Check Tag(AND) = VAR selected = IF ( HASONEVALUE ( 'CALENDAR'[Date] ), VALUES ( 'CALENDAR'[Date] ), BLANK () ) RETURN IF ( MAX ( 'Test Tabel'[Date1] ) = selected && MAX ( 'Test Tabel'[Date2] ) = selected && MAX ( 'Test Tabel'[Date3] ) = selected && MAX ( 'Test Tabel'[Date4] ) = selected && MAX ( 'Test Tabel'[Date5] ) = selected && MAX ( 'Test Tabel'[Date6] ) = selected && MAX ( 'Test Tabel'[Date7] ) = selected, "Y", "N" )
Create table visual.
Result:
Notice: Check Tag(OR) show 'Y' when one of the date fields equal to selected calendar date; Check Tag(AND) show 'Y' when all date fields are equal to selected calendar date.
Regards,
Xiaoxin Sheng
Hi @mitchmoore2
The only other solution that I could think of off hand is to have a seperate Date table per Date column in your EmployeeFact table?
You could do this by creating a Calculated Table (which means that it is an exact replica but only stored in Memory)
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 |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |