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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
THENNA_41
Post Partisan
Post Partisan

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
Super User
Super User

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 @THENNA_41 

try to create a calculated column like this:

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

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors