Forum Discussion

Caz_16's avatar
Caz_16
Helper II
6 years ago
Solved

Nested Filter Referencing Two Unrelated Tables.

Hello everyone,   I am feeling absolutely beat. I have been trying to get a conditional value to populate based on if two conditions are met, which will then be used in future formulas, but apparen...
  • JarroVGIT's avatar
    JarroVGIT
    6 years ago
    You never sell your stock? (Can we assume that if a row has TRUE for one date and stock, it will remain true for the rest of the table for that stock?)
    If so, the calculated column (big difference with a measure) is like this (typing on my phone so sorry for mistakes):
    VAR curDate= Price[date_stamp]
    VAR curStock = Price[Stock_ID]
    RETURN
    IF ( COUNTROWS( FILTER( ALL(Owned), Owned[Stock_ID]= curStock && Owned[BuyDate] < curDate)) > 0, TRUE, FALSE)