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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Replace the value Based other column particular market

I have the table name called Global POL. this table have three column . i am trying to replace the packtype value for  particular market  UA04  .this market vakue trying to  set null value value. when i use replace value its changed for the all market 

 

Market              packtype             

UA04                SOFTPACK

UA04                REMARK 

CA04                SOFTPACK

CA04                REMARK

MA04               SOFTPACK

MA04               REMARK

 

Expected Output:

UA04                

UA04                 

CA04                SOFTPACK

CA04                REMARK

MA04               SOFTPACK

MA04               REMARK

 

Looking for support . thanks in advance . 

2 REPLIES 2
jaweher899
Impactful Individual
Impactful Individual

One way to achieve this in Power BI is to use the FILTER and IF functions together in a calculated column. You can create a new calculated column called "Packtype_Filtered" and use the following formula:

=IF(Global_POL[Market] = "UA04", BLANK(), Global_POL[Packtype])

This formula checks if the value in the "Market" column is "UA04", and if so, it returns a blank value. If not, it returns the original value from the "Packtype" column.

Alternatively, you can also use the SWITCH function to check for different market values and replace the packtype value accordingly:

=SWITCH(Global_POL[Market], "UA04", BLANK(), Global_POL[Packtype])

This function checks the market value, and replaces the packtype value based on the market value.

FreemanZ
Super User
Super User

hi @Anonymous 

try to create a calculated column like this:

column = IF([Market]<>"UA01", [packtype])

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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