Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX calculation

Hi, Please help me to convert the following Tableau calculation in DAX.

 

IF { FIXED [Student Id]:SUM(IF UPPER([Fund Name]) = 'GRANT' THEN 1 ELSE 0 END)} > 0 THEN 'Grant' ELSE 'No Grant' END

 

Thank you!

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    Here are the steps you can follow:

    1. Create calculated column.

    Tableau =
    IF(
    SUMX(FILTER(ALL('Table'),'Table'[Student]=EARLIER('Table'[Student])),
    IF(
        'Table'[Fund Name]="GRANT",1,0))
         >0,"Grant",
        "No Grant")

    2. Result:

     

    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  Anonymous ,

    Here are the steps you can follow:

    1. Create calculated column.

    Tableau =
    IF(
    SUMX(FILTER(ALL('Table'),'Table'[Student]=EARLIER('Table'[Student])),
    IF(
        'Table'[Fund Name]="GRANT",1,0))
         >0,"Grant",
        "No Grant")

    2. Result:

     

    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