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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

When relationship is not found set value to 100

Hello Experts,

 

Im running in to the following problem: I have 2 tables:

Calender

Date datekey More calender stuff
1/1/2020 01012020 etc
1/2/2020 01022020 etc
1/3/2020 01032020 etc

 

values

Datekey value
1012020 55
1032020 12

 

They ofcourse have a relationship on datekey.

I created visuals based on the values. But now i want the following. 

If the datekey exists in calender table but not in the values table it should show a value of 100. 

I tried using EXCEPT but i couldnt get it to work. Anyone of you who did this before and can help me out? 

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , try like

 Measure  = if (sum(Table[Value])+0=0,100, sum(Table[Value]))+0

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

This indeed could work. But i figured out that there are also values of 0. And that would result in more 100's then we would like. 

@Anonymous 

 

Try using ISBLANK

 

Measure  = IF(ISBLANK(SUM(Table[Value])),100, SUM(Table[Value]))


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Anonymous
Not applicable

This works indeed. I thought isblank wont work because there is no record anyway. but it does 😄

Anonymous
Not applicable

How about this?

 

= IF(ISNUMBER(SUM([value]), 100,0)
 
 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.