Forum Discussion
DATE AND TIME MATCHING WITH ERROR
- 4 years ago
visittokiran you can create a measure like this and utilize this a visual level filter
_filter = VAR _a =CALCULATE(MAX('table A'[DATE & TIME])) VAR _b =CALCULATE(MAX('table B'[DATE & TIME])) VAR _c = ABS(DATEDIFF(_a,_b,MINUTE)) RETURN switch(true(),_c=30||_c=0,1)
OK, no worries.
Can you provide a more representative example of your data please?
If you can create an example of tableA and tableB in Power Query (Enter Data) then just post the M code for each that would be ideal.
Pete
BA_Pete I will try to explain in detail.
There are two data tables table A & Table B
I want to fetch data from table B to table A or Creating dashboard will also be fine.
While fetching data from Table B following logic need to be implemented.
First for every row in Table A it first Code no will be checked.
IF code No Matched then Date will be mate if Date Matched then
Time will be matched But time is not exact match in both table.
There is some time gap in time mentioned in table A.
So I want to match time with +-30 min span.
If time also matches then data from INCIDENT & ENTRY TYPE SHALL BE FETCHED IN TABLE A FOR THAT SPECIFIC ROW IN TABLE A.
- smpa014 years agoCommunity Champion
visittokiran you can create a measure like this and utilize this a visual level filter
_filter = VAR _a =CALCULATE(MAX('table A'[DATE & TIME])) VAR _b =CALCULATE(MAX('table B'[DATE & TIME])) VAR _c = ABS(DATEDIFF(_a,_b,MINUTE)) RETURN switch(true(),_c=30||_c=0,1)