Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX Expression to implement in Power BI to replicate with tableau Expression

Can someone help me to implement the same syntax from Tableau into Power BI

 

C_Suspense =       

IF [Date] = {FIXED: Max(IIF([Suspense] > 0, [Date], Date('01/01/2021')))}
THEN [Suspense]
ELSE 0
END

 

please help with new column or new measure 

  • Hi, Anonymous ;

     

    You could create a measure.

     

    Measure = CALCULATE(SUM('Table'[suspense ($)]),FILTER('Table',[Date]=CALCULATE(MAX('Table'[Date]),ALL('Table'))))

     

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous ;

     

    You could create a measure.

     

    Measure = CALCULATE(SUM('Table'[suspense ($)]),FILTER('Table',[Date]=CALCULATE(MAX('Table'[Date]),ALL('Table'))))

     

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • SpartaBI's avatar
    SpartaBI
    Icon for Community Champion rankCommunity Champion

    Anonymous better if you can share a sample data and the desired result and I could write to you the code.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Date

      Suspense ($)

      1/08/2022

           150000

      1/08/2022

           80000

      2/08/2022

          200000

      2/08/2022

           10000

      2/08/2022

           3000

      3/08/2022

          300000

      3/08/2022

           10000

       

      I need the max Date and SUM of Suspense value

       

      Thanks,

      Vicky