Forum Discussion
How to create the measure based on Date column in Excel
- 10 years ago
WEEKDAY() demands a scalar value. You are passing it a column reference. When you ask for WEEKDAY( 'DimDate'[Date] ), you're asking the formula engine to return the weekday of a list of dates? How can it return a single weekday for >1 dates?
What is the purpose of this measure? Typically weekday would be an additional field in the date table, not a measure. You can add a calculated column in your date dimension using the same formula you've proposed. This is because calculated columns are evaluated in row context. In a row context, any column is guaranteed to have one value.
WEEKDAY() demands a scalar value. You are passing it a column reference. When you ask for WEEKDAY( 'DimDate'[Date] ), you're asking the formula engine to return the weekday of a list of dates? How can it return a single weekday for >1 dates?
What is the purpose of this measure? Typically weekday would be an additional field in the date table, not a measure. You can add a calculated column in your date dimension using the same formula you've proposed. This is because calculated columns are evaluated in row context. In a row context, any column is guaranteed to have one value.
Hi,
Thanks for this explanation. I was trying measure calculation on row level context.
Would these additional derived columns affect the performace as I need to calculate few interdependent columns ?
Thank you in advance
- greggyb10 years ago
Resident Rockstar
I still haven't got a clue what it is you want to do.
Do calculated columns affect performance? Yes. Do they affect it enough to worry about? Almost definitely not.
- Anonymous10 years agoNot applicable
ashishtele It looks like your confusing measures and calculated columns. Read through this for a detailed explanation of both and when/how to use them.
- ashishtele10 years agoFrequent Visitor
Anonymous...Thank you. It was good to read the article.