Forum Discussion

nirupreddy's avatar
nirupreddy
Frequent Visitor
7 years ago
Solved

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?
  • MFelix's avatar
    MFelix
    7 years ago
    Hi 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