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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
pmazara
Frequent Visitor

Conditional Replace Value across table (multiple rows/columns) for values greater than 1

Seeking help in figuring out a query that will replace all values greater than 1 with 1

 

see attached screenshotQuery replace.PNG

1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try to add custom columns in Query Editor:

71.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

4 REPLIES 4
v-gizhi-msft
Community Support
Community Support

Hi,

 

Please try to add custom columns in Query Editor:

71.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

amitchandak
Super User
Super User

Create new columns

Category 1 new =if(table[Category 1 ]>1,1,0)

Category 2 new =if(table[Category 2 ]>1,1,0)

Category 3 new =if(table[Category 3 ]>1,1,0)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak - not practicable as columns can vary (15-25) from source data. currently has 15 columns. I'd rather transform the the data in edit query within existing columns

You can do while doing some calculation like

 

New Measure = Sumx(table,if(table[category]>1,1,0))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors