Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hii experts
I have Two tables (A And B) both having key which is used to establish relation among them. and Table A having invoice date as shown below
TABLE A | |
Invoice date | key |
03-03-2021 | 1 |
04-02-2021 | 2 |
And Table B having From date and Two date as shown below
TABLE B | ||||
Customer Name | From Date | To Date | key | |
ABC | 01-01-2021 | 12-01-2021 | 1 | |
SDF | 02-01-2021 | 22-01-2021 | 2 | |
CFR | 03--2-2021 | 31-03-2021 | 3 |
I need Customer Name from Table B to Table A using key for those where Invoice Date lies between From date & To Date "
"
Solved! Go to Solution.
How about this?
Customer Name =
VAR BetweenDates =
'Table A'[Invoice Date]
>= RELATED ( 'Table B'[From Date] )
&& 'Table A'[Invoice Date]
<= RELATED ( 'Table B'[To Date] )
RETURN
IF (
BetweenDates,
RELATED ( 'Table B'[Customer Name] )
)
How about this?
Customer Name =
VAR BetweenDates =
'Table A'[Invoice Date]
>= RELATED ( 'Table B'[From Date] )
&& 'Table A'[Invoice Date]
<= RELATED ( 'Table B'[To Date] )
RETURN
IF (
BetweenDates,
RELATED ( 'Table B'[Customer Name] )
)
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |