Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello, community.
I tried making a calculated column for a date value so that I could create a hierachy used for time dimensions. When I first created a measure, the date calculation produced the expected the results. When I made the column using the same exact formula/calculation, however, I got a single value for all rows...which appeared to be the average or something. I found plenty of posts/threads on this forum explaining how measures and columns work differently. So, this led me to try breaking up the formula into measures and then calculating the column from those component measure...and that worked! Basically, I have a DATE and a DURATION. In the original measure, there is a variable to deal with the case that no DATE exists and another variable deals with the case if no DURATION (in weeks) if a duration doesn't exist.
Here are the variables:
ApproveDate1 + (Duration1*7) //(to add days)
Breaking out each variable into its own measure, the final Column calculation is simply:
DATE measure + (DURATION measure*7) //(to add days)
Why did breaking it up work for the column rather than having the variables which you would think should do the same thing?
Hi @MarkD1722
Maybe you can try: CALCULATE(SELECTEDVALUE())
The CALCULATE performs the context transition:
For example, here's the sample data:
Then add a calcualted column:
Column = SELECTEDVALUE('Table'[ID])
Then add a CALCULATE():
Column = CALCULATE(SELECTEDVALUE('Table'[ID]))
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
When I made the column using the same exact formula/calculation
That will fail. Columns don't have filter context. They have no idea what "SELECTEDVALUE" means.
By using MAXX you are creating row contexts, even for measures.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |