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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Measure and Calculation column not working properly

roopesh_0-1595993096252.png

I have two calculated columns(TimeFrameDateRangeCol1) one is a measure (TimeFrameDateRange1 ) other is a calculation 

 

TimeFrameDateRange1 = 
IF( NOT( ISBLANK(vw_patientListNew[MinselectedDateRange1]) && ISBLANK(vw_patientListNew[MaxselectedDateRange1])),
vw_patientListNew[MinselectedDateRange1]  &"-"& vw_patientListNew[MaxselectedDateRange1],Blank())
TimeFrameDateRangeCol1 = 

IF(isblank([TimeFrameDateRange1]),"blank","Not")

 

 as you can see TimeFrameDateRangeCol1 condition is failing. Can you please let me know i i am doing wrong

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , seem like you are trying to pass the parameters to a column, that is not possible. You can have a measure equivalent of that column by pushing row context

 

refer

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Difference-Across/ba-p/934397#M451

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

I removed the measure in the column and still there is issues:

roopesh_0-1596016998617.pngroopesh_1-1596017036016.png

as you can see the slicer1 is between 01/01/1989 and 7/26/1990. In TimeFrameDateRangeCol1  i want 1 for exists and blank for dont exists.

DateFilterRange = IF(MAX(vw_patientListNew[StatusDate]) in UNION(VALUES(DateRange1[Date]),VALUES(DateRange2[Date]),VALUES(DateRange3[Date])),1)
TimeFrameDateRangeCol1 = 
IF(MAX(vw_patientListNew[StatusDate]) in VALUES(DateRange1[Date]),1)

 

AntrikshSharma
Super User
Super User

You are using measure in a calculated column, which triggers context transition and then each row of that table filters the measure, so it looks like the measure is never evaluated to be blank. Don't use a measure in a calculated column unless you have working knowledge of context transition.

Read this article: https://www.sqlbi.com/articles/understanding-context-transition/

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.