Forum Discussion

pranays1's avatar
pranays1
New Member
2 years ago
Solved

Create a conditional column by summarizing the unique values in the source table

Entity IDEntity NameAccount No.Account NameAmount
100Entity A1001Name 11000
100Entity A1002Name 22000
101Entity B1004Name 42500
101Entity B1005Name 53000
102Entity C1008Name 81800
102Entity C1009Name 94000

 

I have a data in a table format as above where there are multiple entities with multiple account nos and names now i want to create a new column by summarizing the amount based on entity id and have a condition as following : If(Amount >= Total Assets, "Entire", "No") the total assets is present in a different table as single record 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi  pranays1 ,

    I created some data:

     

    Here are the steps you can follow:

    1. Create calculated column.

    Condition =
    var _sum=
    SUMX(
        FILTER(ALL('Total Assets Table'),
        'Total Assets Table'[Entity ID]=EARLIER('Table'[Entity ID])),[Total Assets])
    return
    IF(
        [Amount]>=_sum,"Entire", "No")

    2. Result:

    If it doesn't meet your expectations, you can provide more information about "total assets" and we can help you better!

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  pranays1 ,

    I created some data:

     

    Here are the steps you can follow:

    1. Create calculated column.

    Condition =
    var _sum=
    SUMX(
        FILTER(ALL('Total Assets Table'),
        'Total Assets Table'[Entity ID]=EARLIER('Table'[Entity ID])),[Total Assets])
    return
    IF(
        [Amount]>=_sum,"Entire", "No")

    2. Result:

    If it doesn't meet your expectations, you can provide more information about "total assets" and we can help you better!

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly