Forum Discussion

kee's avatar
kee
Frequent Visitor
7 years ago
Solved

Excel formula to Power BI

Hi,   Can anyone help me to convert the below excel formula to power BI DAX?   =SUMIFS([@[NET OWING]],[@DATE],">="&TODAY()-15)      
  • Anonymous's avatar
    Anonymous
    7 years ago

    =CALCULATE (
        SUM ( Table1[NET OWING] ),
        FILTER ( Table1, Table1[Date] >= ( TODAY () - 15 ) )
    )

  • Anonymous's avatar
    Anonymous
    7 years ago

    It'll basically be the same formula but twice, with the days changed to 59 and 29

     

    CALCULATE (
        SUM ( Table1[NET OWING] ),
        FILTER ( Table1, Table1[Date] >= ( TODAY () - 59 ) )
    )
        - CALCULATE (
            SUM ( Table1[NET OWING] ),
            FILTER ( Table1, Table1[Date] >= ( TODAY () - 29 ) )
        )