The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have 2 disconnected tables:
ProductValueLookup Column
A | 2 | ? |
A | 3 | ? |
B | 4 | ? |
B | 5 | ? |
and
ProductValue2
A | 3 |
A | 2 |
A | 2 |
B | 1 |
I can create a measure to lookup and sum the value from Table 2 to Table 1:
Lookup Measure = CALCULATE(SUM(Table2[Value2]), TREATAS(VALUES(Table1[Product]), Table2[Product]))
How can I create a calculated column in Table 1 to have the same result as the measure above?
Here is the PBI file link: https://1drv.ms/u/s!Aps8poidQa5zmbVOuWoPQC_VC5yysw?e=XGeX4T
Thanks
Solved! Go to Solution.
Lookup Column =
CALCULATE(
SUM( Table2[Value2] ),
TREATAS( { ( Table1[Product] ) }, Table2[Product] )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Lookup Column =
CALCULATE(
SUM( Table2[Value2] ),
TREATAS( { ( Table1[Product] ) }, Table2[Product] )
)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
User | Count |
---|---|
68 | |
62 | |
59 | |
54 | |
28 |
User | Count |
---|---|
181 | |
82 | |
66 | |
47 | |
44 |