Forum Discussion

itsranga's avatar
itsranga
Helper I
1 year ago
Solved

Need Help - DAX Code

Hi Team,  I have a Data like this (Top table), I need result like bottom table   If the Parent Ticket is not blank, the Relevant hrs should be blank. If the Parent Ticket is blank, the resu...
  • FBergamaschi's avatar
    FBergamaschi
    1 year ago

    This is very simple but in your original data it was not like this, here is the table you showed

     

     

    Anyway I adjusted the data and now I have the following

     

     

    and now I have what you want without any hardwiring:

     

    Test =
    VAR Ticket = Tabella[Ticket No]
    RETURN
    SUMX ( FILTER ( Tabella, Tabella[Parent Ticket] = Ticket ), Tabella[Total Hrs] )
     
    The above is a column
     
    If you want a measure, let me know
     

    If this helped, please consider giving kudos and mark as a solution

    me in replies or I'll lose your thread

    Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

    Consider voting this Power BI idea

    Francesco Bergamaschi

    MBA, M.Eng, M.Econ, Professor of BI