Forum Discussion

Chitemerere's avatar
Chitemerere
Responsive Resident
6 years ago
Solved

Generating new column based on another column values

I have the following from my Power BI data set:

 

Country

Annual Spend (USD)

Zimunda

0

Taguma

230000

Chireshe

200000

Tichafa

0

Machenga

0

Engen

180000

Takashinga

250000

Chamega

150000

 

I need to have a new table where the countries with 0 Annual Spend (USD) are removed, the following is the expected result:

 

Country

Annual Spend (USD)

Taguma

230000

Chireshe

200000

Engen

180000

Takashinga

250000

Chamega

150000

 

How can this be accomplished in Power BI Desktop?

 

Thanking you in advance.

 

Regards,

Chris

3 Replies

  • andre's avatar
    andre
    Memorable Member

    click on Modeling->New Table then the DAX to create the new table is the following:

     

    newTableName = filter(all(oldTableName), oldTableName[Annual Spend (USD)]>0)

     

     

    • Chitemerere's avatar
      Chitemerere
      Responsive Resident

      Thank you for the solution, appreciated.

       

      Regards,

      Chris