Forum Discussion

gauravnarchal's avatar
gauravnarchal
Post Prodigy
4 years ago
Solved

Issue with Measure - Row total

Hello - I have created the below measure in which row total is not showing correctly. How can i fix this issue?   Sale = Sumx(Values(Table[ID]) ,  CALCULATE(IF([Gross Amount]<7000,0,IF([Gross Amoun...
  • v-chenwuz-msft's avatar
    4 years ago

    Hi gauravnarchal ,

     

    There are some errors in your code that are causing power bi to not recognize the filters you want correctly.

    Maybe you can try this code:

    Sale =
    SUMX(
        'Table',
        IF(
            [Gross Amount] < 7000,
            0,
            IF( [Gross Amount] > 100001, 5000, [Gross Amount] * 0.05 )
        )
    )
    

    result:

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

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