Forum Discussion
nirupreddy
7 years agoFrequent Visitor
How to filter in DAX using another column in a table?
Suppose i have two tables table and tableB in power bi "CALCULATE ( expression, table[column] = value )" In the above DAX can I use tableB[column2] instead of value?
- 7 years agoHi nirupreddy,
Understand your requirements but believe that your setup.is not the most efficient and with bedt options, just a question if you have a leap.year with 53 weeks how does that compare with previous year, to week 52 or week 1 of current year?
However I believe that you date table could be setup in a different way try the following measure:
Measure = CALCULATE (EXPRESSION ; FILTER(ALL(Table[YYYYWW]); Table[YYYYWW] = MAX (Table[LYYYYYWW] ) ))
Not on computer so didn't try it but should work.
Regards
MFelix
v-frfei-msft
7 years agoCommunity Support
Hi nirupreddy,
I made one sample for your reference. If it doesn't meet your requirement, kindly share your sample data and excepted result to me.
Measure =
CALCULATE (
SUM ( Table1[Column2] ),
FILTER ( Table1, Table1[Column1] = MAX ( Table2[Column1] ) )
)
Regards,
Frank
v-frfei-msft
7 years agoCommunity Support
Hi nirupreddy,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank