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.
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] )
)
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 |
---|---|
111 | |
95 | |
77 | |
69 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |