Forum Discussion
Date table reference for measures
I have a calculated column in my date table "IsCurrentMonth". When I try to reference that column in a new measure it does not come up as an option. I'm also not able to reference the date table when creating a new variable inside a new measure to filter out current month. Any ideas on the issue here? Thank you.
3 Replies
- amitchandakSuper User
Tripb44 , Try to start with [ or with table name and column name
Var is ='Date'[iscurrentMonth]
I have used in this video and it worked -https://www.youtube.com/watch?v=hfn05preQYA
- Tripb44Helper II
Amitchandak, that is what I would normally expect but is not the case for some reason. Below is what's happening when referencing the date column. Shown also is the date table for reference.
- AnonymousNot applicable
Hi Tripb44,
You can't direct use table columns in your measure expressions. Please package your field with aggregate functions or selectedvalue to extract the current value.
Calculated Columns and Measures in DAX - SQLBI
Using the SELECTEDVALUE function in DAX - SQLBI
Regards,
Xiaoxin Sheng