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.
Hello Friends
I need some help here !
let's say I have 'Table1', and 'Tabel2'. the two tables have the same column [A] with the same content.
How can I write the folloing in DAX?
I want to add a new column [B] to 'Table1', which is the sum of 'Table2'[X] when the two columns [A] is equal on both tables?
appreciate your help.
Solved! Go to Solution.
This assumes there is a unique X value per A value.
You can avoid this summing X instead.
B = CALCULATE ( SUM ( Table2[X] ), Table2[A] = EARLIER ( Table1[A] ) )
Hi,
Firstly bring the Column X for Table 2 in your Table 1 by LOOKUPVALUE:
Create a new column in your Table 1:
X= LOOKUPVALUE(Table2[x], Table2[A], Table1[1])
Mark this as a solution if I answered your question.Kudos are always appreciated.
Thanks
This assumes there is a unique X value per A value.
You can avoid this summing X instead.
B = CALCULATE ( SUM ( Table2[X] ), Table2[A] = EARLIER ( Table1[A] ) )
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 |
---|---|
14 | |
11 | |
8 | |
8 | |
8 |
User | Count |
---|---|
22 | |
13 | |
11 | |
10 | |
10 |