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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
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.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.