Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All,
I want to fetch the value of Date from TAB2 depending on the *Condition(listed below) from the TAB1.
TAB1 | |||
Company | Key field | Invoice number | Doc number |
ABCX | 15 | 123456 | 123456 |
ABCX | 1 | 123456 | 1245987 |
TAB2 | ||
Company | Invoice number | Date |
ABCX | 123456 | 01-01-2000 10:00 |
ABCX | 123456 | 02-01-2000 10:00 |
The condition is fetch the value of the date field from TAB2 for the same invoice number present in TAB1 only if the Key field value is "15" for the same invoice number in TAB1
This is what i have written but it says memory error. Any idea where I am going wrong?
Pay Date = if('TAB1'[Invoice Number] == 'TAB1'[Doc Number],if('TAB1'[key field] = "15",LOOKUPVALUE('TAB2'[Date],'TAB2'[Invoice Number],'TAB1'[Doc Number])))
I have created a new column and have applied the query to the same column
Thanks in Advance.
Hi @Anonymous
If possible, please provide your pbix file(remove sensitive info) so that we can create the results you need based on your model .
Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You could try to create a column as below:-
Pay Date =
IF (
'Tab1'[Invoice Number] = 'Tab1'[Doc Number]
&& 'Tab1'[key field] = 15,
CALCULATE (
MAX ( 'Tab2'[Date] ),
FILTER ( Tab2, 'TAB2'[Invoice Number] = 'Tab1'[Doc number] )
)
)
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi Samarth,
I tried but I am getting Out of Memory error
Hi @Anonymous
Is there any relationship between the two tables? Can you create/modify relationships? Which of the dates would like to retrieve? For example the first date or the last date?
Yes there is relationship maintained between the tables.
I typed the second date accidentally, I just want the date value from tab 2 with the conditions mentioned above.
@Anonymous
Which columns are involved in the relationship?
I am getting this error even if i try doing it for just one entry
Hi,
Try something like this:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Proud to be a Super User!
I tried the solution, but I am getting memory error.
In that case the problem is with your model optimization. Try creating a measure. E.g.
Proud to be a Super User!
Hi,
I am getting an error "unexpected parameter BLANK() when I type the measure. I have used the same code that you have provided
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
20 | |
17 | |
16 | |
13 | |
10 |