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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Kolumam
Post Prodigy
Post Prodigy

Changing a column value of a specific row based on another column using slicer/button

I have the below sample table.

NameSizeCostYear 1Year 2Year 3
X23615
Y452019
Z3721410

 

Year 1, Year 2 and Year 3 are calculated using Power Query.

Year 1 = Size * Cost

Year 2 = Cost - Size

Year 3 = Size + Cost

 

I need to replace the Year 1, Year 2 and Year 3 values for Name Y alone based on a slicer/button. Is it possible?

Year 126
Year 211
Year 310

 

Expected Output:

When I click a button, the table should change to below:

NameSizeCostYear 1Year 2Year 3
X23615
Y45261110
Z3721410

 

@parry2k @mahoney19  @parry2k @az38 @jdbuchanan71 @mahoneypat @edhans @harshnathani @v-kellya-msft @MFelix @Ashish_Mathur @BA_Pete @ryan_mayu @kbuckvol @Alexander76877 @Petazo @Mariusz @TomMartens @Greg_Deckler @tjd @Sean @mikstra @AllisonKennedy @EricHulshof @briandpeterson @USG_Phil @vpatel55 @mwegener @v-piga-msft @tex628 @sturlaws @Vvelarde @CheenuSing @MarcelBeug @Zubair_Muhammad @v-piga-msft @danextian @MattAL @MattAllington @roalexan @Alexander76877 @kgc 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Kolumam , You can check for isfiltered and value of selected column or Both . Assume Year1 is a measure.

 

New Year One = if(isfiltered(Slicer[slicer]) && SelectedValue([Slicer[Slicer]) = "Y" ,26 ,[Year 1])

 

Repeat this for year 2 and year 3.

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Kolumam , You can check for isfiltered and value of selected column or Both . Assume Year1 is a measure.

 

New Year One = if(isfiltered(Slicer[slicer]) && SelectedValue([Slicer[Slicer]) = "Y" ,26 ,[Year 1])

 

Repeat this for year 2 and year 3.

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.