Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dax code for deleting rows.

Hi all,

 

My first post, so if any suggestions please let me know.

I got a column with client names, I want to delete some rows with a specific name; all names with a suspense account in it. I got a list with these names I want to delete, just don't know how. Any suggestions?

 

Thanks,

Paul 

  • Hi Anonymous 

     

    You can not use DAX to delete rows, but you can exclude them as in the example below.

    Measure = 
    CALCULATE(
        SUM( 'Table'[Value] ),
        KEEPFILTERS(
            'Table'[ID] IN { "A", "D" } = FALSE
        )
    )

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski

     

1 Reply

  • Mariusz's avatar
    Mariusz
    Community Champion

    Hi Anonymous 

     

    You can not use DAX to delete rows, but you can exclude them as in the example below.

    Measure = 
    CALCULATE(
        SUM( 'Table'[Value] ),
        KEEPFILTERS(
            'Table'[ID] IN { "A", "D" } = FALSE
        )
    )

     

    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski