Forum Discussion
Sujit_Thakur
6 years agoSolution Sage
date time Relationship
Dear all, I have two tables Table A and Table B Table A is a event where for every day we store records for every event along with time for eg date column. Time column 8/11/2020 ...
- 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
amitchandak
6 years agoSuper User
Sujit_Thakur , Just like common date table have common time table too
https://kohera.be/blog/power-bi/how-to-create-a-time-table-in-power-bi-in-a-few-simple-steps/