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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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])

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.