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.
Please help with this Dax:
I have a purchase ref#=lookupvalue(‘table1’[ref#],
‘Table1[purchase amount],’table2[purchase amount]
Issue is table 1 has multiple line that repeat the purchase amount for a reference number. I want only the first row to be looked up and returned.
Hi @Powerbiji99
Could you please share the dummy data set and expected output.
Regards
Uphar
Happy To Help!
The goal is to link 2 datasets by a reference number. The lookupvalue Dax is being used to match 4 variables and return reference number if match. Problem with the amount is that it's being double, triple counted depending on number of lines
The data set in table 1 is an extract. There are multiple lines with the same amount referencing the same ref#. The multiple lines are due to coding distribution.
table 2 on the other had only has one line referencing the ref#
Also, I can't use data model to link the ref# because there are 3 other variables in the lookupvalue
Hi @Powerbiji99
What determines the first row? What column? A date perhaps? Internally DAX knows no order in the rows so you need something to specify that order. With that you could extract the MIN of the results that have that purchase amount.
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
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 |
---|---|
48 | |
24 | |
20 | |
14 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |