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

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

Reply
jrussell
New Member

Creating a measure with if statement with text

The table visual I have created has columns for account IDs, prior region, prior territory, new region, new territory, and last year's sales associated with each account. These columns are from two different data tables (Prior & New). We re-allocated accounts to different regions and territories and want to show regional managers which accounts they lost, which they gained, and the associated sales with each of those accounts.

 

I'd like to create a measure using an IF statement to show =IF(PriorTerritory=NewTerritory," ",NewTerritory). I would insert a slicer so that regional managers could select their regions and see which territories are different than prior. Unfortunately, the IF statement is not working with the text fields.

 

Open to different ideas to make this work.

 

Thanks!

4 REPLIES 4
v-xjiin-msft
Solution Sage
Solution Sage

Hi @jrussell,

 

Please share us more detailed information like some sample data which we can copy and paste directly and its corresponding expected result.

 

Thanks,
Xi Jin.

I found a way around this by creating a new column using an if statement that returns 0 or 1 if there is a change. Thanks for your quick response.

Floriankx
Solution Sage
Solution Sage

Hello,

 

did you try a calculated column? If Statement should be fine with it.

I would use Blank() instead of '" "' but it's a matter of taste.

 

If both columns are in the same.

Otherwhise you may have to use RELATED once.

jrussell
New Member

The table visual I have created has columns for account IDs, prior region, prior territory, new region, new territory, and last year's sales associated with each account. These columns are from two different data tables (Prior & New). We re-allocated accounts to different regions and territories and want to show regional managers which accounts they lost, which they gained, and the associated sales with each of those accounts.

 

I'd like to create a measure using an IF statement to show =IF(PriorTerritory=NewTerritory," ",NewTerritory). I would insert a slicer so that regional managers could select their regions and see which territories are different than prior. Unfortunately, the IF statement is not working with the text fields.

 

Open to different ideas to make this work.

 

Thanks!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.