Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to delete unwanted rows?

I have a CSV dataset where I only want to load the Imports and Exports rows. I have filtered it accordingly. 

 

However, I want to remove the remaining rows which are simply selection criteria and are taking up space in my model. 

 

 Can someone please help with removing the unnecessary rows ? Everything except the Import and Export Rows. 

 

thank you

 

 

7 Replies

  • Anonymous , Using a filter from UI should work. Or create a calculated column with flag 1 and 0 based on the value and then select 1 or 0 and filter

    • Anonymous's avatar
      Anonymous
      Not applicable

      thank you - could you please explain how to do the calculated column bit ? 🙂

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        Write this custom formula in the Query Editor

        =if [Trade Direction]="Imports" or [Trade Direction]="Exports" then 1 else 0

        The language of the Query Editor (Mashup or "M") is case sensitive.