Forum Discussion
date time Relationship
- Anonymous6 years ago
Hi Sujit_Thakur,
It is impossible to build relationships as same as your requirement.
In my opinion, I'd like to suggest you write a measure formula to check records based on your selections and use on 'visual level filter' to filter records.
You can create two slicers that no direct effect the visual to pick up selected values of date values and time range.
Measure = VAR selectedDate = MAX ( Calendar[Date] ) VAR timeRange = ALLSELECTED ( Selecotr[Hour] ) VAR currDate = MAX ( Table[Date] ) VAR currTime = MAX ( Table[Time] ) RETURN IF ( curDate = selectedDate && AND ( HOUR ( currTime ) >= MINX ( timeRange, [Hour] ), HOUR ( currTime ) <= MAXX ( timeRange, [Hour] ) ), "Y", "N" )Reference link:
Applying a measure filter in Power BI
Regards,
Xiaoxin Sheng
Hi Sujit_Thakur,
It is impossible to build relationships as same as your requirement.
In my opinion, I'd like to suggest you write a measure formula to check records based on your selections and use on 'visual level filter' to filter records.
You can create two slicers that no direct effect the visual to pick up selected values of date values and time range.
Measure =
VAR selectedDate =
MAX ( Calendar[Date] )
VAR timeRange =
ALLSELECTED ( Selecotr[Hour] )
VAR currDate =
MAX ( Table[Date] )
VAR currTime =
MAX ( Table[Time] )
RETURN
IF (
curDate = selectedDate
&& AND (
HOUR ( currTime ) >= MINX ( timeRange, [Hour] ),
HOUR ( currTime ) <= MAXX ( timeRange, [Hour] )
),
"Y",
"N"
)
Reference link:
Applying a measure filter in Power BI
Regards,
Xiaoxin Sheng