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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Help required to replace blank value with a measure

Hi,

 

I am trying to replace blank values in the column "value" with the max value if country = US.

It is working fine if i enter replacement value as integer.

 

Columns in Table A: Key, Country, Value

Columns in Table B: Key, Country, Sales

 

Tester.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks in advance!

5 REPLIES 5
Anonymous
Not applicable

Alright so this is how i resolved it.. Might not be the smartest way but it worked

 

Created a variable '_num' : this contains the max value of column [Value] when country is US 

 
 
CONSOLIDATED WAY =
VAR _num = MAXX('Table A',CALCULATETABLE(VALUES('Table A'[Value]),'Table A'[Country]="US"))
return
IF(
ISBLANK('Table A'[Value]),_num, 'Table A'[Value])
 
 

Tester.png

amitchandak
Super User
Super User

@Anonymous 

 write

if(isblank('Table A'[ Value]) , _num,'Table A'[ Value])

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
Anonymous
Not applicable

hi,

I had initially tried this out but it did not work - check the original screenshot.

However for now i was able to solve it.

 

Thanks 

Sujit_Thakur
Solution Sage
Solution Sage

Dear friend , You can use

Replace = IF (ISBLANK(Values) , 0 ,Values)

 

 

This will help 

 

 

Please give appreciation by pressing kudos button 

And if it helped please accept this post as an answer 

 

If you didn't get to answer 

Please tag me I'll be more than happy to help you !

Regards 

Sujit

Dear @Anonymous  , 

I hope you reached your goal 

Please accept my post as solution , if it helped , if you have doubt feel free to tag and reply 😁

 

Regards ,

Sujit Thakur 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.