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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Valnus
Helper II
Helper II

Change two separate values out of a column with DAX messure

Hi 

 

So I have a colum that has two value types  ( blank and numbers ). The numbers are unique. 

I need to change the Blank entries to text and I need to change all the numbers to text aswell. 

 

So blank needs to be replaced with "Blue". And 1 to 5 needs to be changed to "Red"

I have managed to change blank to "Blue" very poorly. I first counted all the blanks in a messure then via another messures replaced Blank. The number change is evading me. 

Any suggestions ? 


1 ACCEPTED SOLUTION
Tahreem24
Super User
Super User

@Valnus Create a column like below:

Result Column = IF(TableName[ValueColumn]=BLANK(),"Blue","Red")
Then take table and add yourValue Column and above newly created column and mark this new column as "show titem with no data" just like below screenshot.
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

View solution in original post

5 REPLIES 5
Tahreem24
Super User
Super User

@Valnus Create a column like below:

Result Column = IF(TableName[ValueColumn]=BLANK(),"Blue","Red")
Then take table and add yourValue Column and above newly created column and mark this new column as "show titem with no data" just like below screenshot.
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
johnt75
Super User
Super User

Use Power Query. Make sure that the column type is numeric and add a conditional column that gives Red if the value is between 1 and 5, Blue if the value is null and gives the existing value otherwise. Once you have added the conditional column you can delete the base column if you don't use it for anything else.

Hi 

 

So the colum is numeric as there are alot of numbers ( ID's ) & the null values in the column 
So I need to change all the null's to "Main Member" & all the random 1 to 5 digits to " Dependent" 

That's even simpler then, just add a conditional column which gives "Main Member" if the value in your column is null otherwise it gives "Dependent"

So an IF statment ? 

I tried but when I wanted to get a COUNT of each to use with another value. 

Can you give me an example of the DAX statment please 

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.