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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.