Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chitemerere
Responsive Resident
Responsive Resident

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

2 ACCEPTED SOLUTIONS
andre
Memorable Member
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)

 

 

View solution in original post

amitchandak
Super User
Super User

@Chitemerere . In visual level table you can have visual level filter <> 0

 

in Power Query you can filter <> 0 or copy table and filter <>0

 

in dax you can create a new table

https://docs.microsoft.com/en-us/dax/calculatetable-function-dax

cnew Table = alculatetable(Table, Table[Annual Spend (USD)] <>0 )

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Chitemerere . In visual level table you can have visual level filter <> 0

 

in Power Query you can filter <> 0 or copy table and filter <>0

 

in dax you can create a new table

https://docs.microsoft.com/en-us/dax/calculatetable-function-dax

cnew Table = alculatetable(Table, Table[Annual Spend (USD)] <>0 )

andre
Memorable Member
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
Responsive Resident
Responsive Resident

Thank you for the solution, appreciated.

 

Regards,

Chris

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.