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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.