Forum Discussion

Moushmi's avatar
Moushmi
Frequent Visitor
1 year ago
Solved

Getting max date from date filter using DAX measure but ignoring in matrix calculated column

  Hi, I am using Direct Query I am trying to create a Matrix to display financial report. My matrix should show, Row: Account code Value: Amount Column: Beginning balance ( balance of pri...
  • amitchandak's avatar
    amitchandak
    1 year ago

    Moushmi , You need build balances using cumulative method. If the day is driver then you can have like 

     

    BOP= CALCULATE(SUM(Table[IN]),filter(all(date),date[date] <min(date[date]))) -
    CALCULATE(SUM(Table[OUT]),filter(all(date),date[date] <min(date[date])))

     

    same way I can use Year of FY (Numeric)

    BOP= CALCULATE(SUM(Table[IN]),filter(all(date),date[Year] <min(date[Year]))) -
    CALCULATE(SUM(Table[OUT]),filter(all(date),date[Year] <min(date[Year])))

     

    Same way End of period is 

     

    EOP= CALCULATE(SUM(Table[In]),filter(all(date),date[date] <=Max(date[date]))) -
    CALCULATE(SUM(Table[Out]),filter(all(date),date[date] <= Max(date[date])))