Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Convert if statement to value

Hello,  Is tehere a way how to convert returned value from if statement into number?  In IMG (Column 2G_5RDC-TA)  is visible that power bi does not sum returned value and treat them as string.  My...
  • v-kkf-msft's avatar
    4 years ago

    Hi Anonymous ,

     

    Please try the following formula:

     

    2G_5RDC-TA = 
    SUMX (
        SUMMARIZE (
            Load_data_merged,
            Load_data_merged[Load number],
            "result",
                IF (
                    "5RDC" IN VALUES ( Load_data_merged[Sufix_template.FDP] ),
                    IF ( "TA" IN VALUES ( Load_data_merged[Sufix_template.FDP] ), 1, "" )
                )
        ),
        [result]
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.