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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
jankonas
Advocate I
Advocate I

Strange DAX evaluation context

Hi community,

 

I have been trying to figure it out for a while but with no success.

 

I have an easy table where one IA has many types and I want to calculate only one type based on numbers. In this example, this IA has 134 RD (Rodinný dům (home house)) and 0 BD (apartment building). I compare both number and in this case it works fine. The result is Rodinný dům (home house)

jankonas_1-1738850168227.png

This is the measure:

jankonas_2-1738850542238.png

However, when I changed the measure to more and equeal, it will stop working properly (cross join is applied and context is lost)

jankonas_3-1738850614424.png

jankonas_4-1738850689249.png

The same, when I replace blank with a value.

jankonas_5-1738850755083.png

How is it possible that with a little change I can lose the full context and cross join is applied? IA is from DIM_IA and Type (objekt type) from DIM_ROP.

jankonas_8-1738851362110.png

 

Below I am attaching all measures. Here I am adding +0, otherwise the row in the table disappared because the row has no value. Other IA can have both numbers but mostly one of them doesn't exist.

jankonas_6-1738850876906.pngjankonas_7-1738850890464.png

Thank you,

Jan

 

1 ACCEPTED SOLUTION

I think you can combine the >= with a check for NOT ISBLANK()

Type calculated =
IF ( NOT ISBLANK ( [RD] ) && [RD] >= [BD], "Rodinny dum" )

View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

When you change the condition to >= the extra row which appears shows blank for both [RD] and [BD]. As blank = blank [Type calculated] returns the value, rather than returning blank as it did when you had the condition as >.

Thank you @johnt75, it makes sense. Do you think there is a dax expression which would work in this case? I found out that I can use a visual calculation and hide both the columns BD and RD by slicing them. I believie this is not so clean solution as this is only a small pattern that I am showing. I just wonder, if dax can handle this by not comparing blank values?

I think you can combine the >= with a check for NOT ISBLANK()

Type calculated =
IF ( NOT ISBLANK ( [RD] ) && [RD] >= [BD], "Rodinny dum" )

Works perfect. DAX evaluation with a blank value can be tricky. Thank you for the explenation and following solution.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.