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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors