Forum Discussion
Value between Two Dates
Hi Creative_tree88 ,
As i see in the organization of your variables, this calculated column should be placed on Finance Data not in Sales Data.
Try it and tell me if you got the desired output.
Thank you
- Creative_tree881 year agoHelper V
Bibiano_Geraldo Many thanks. It is indeed in the finance data, not the sales data. It has worked previously, so I'm scratching my head a little with this one!
- Bibiano_Geraldo1 year agoSuper User
If you want the calculated column in sales data, you have to work in this part of your DAX:
VAR _start = 'Finance Data'[Sales Letter A Date] VAR _end = 'Finance Data'[Sales Letter B Date] VAR _key = 'Finance Data'[KEY]This is bringing the entire column, not a single value, thats way you got the error: A single value for column 'Sales Letter A Date' in table 'Finance Data' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count...
if you use aggregations suc MAX, MIN in that part of your code as shown bellow, you will not get the error:
VAR _start = MIN('Finance Data'[Sales Letter A Date]) VAR _end = MIN('Finance Data'[Sales Letter B Date]) VAR _key = MIN('Finance Data'[KEY])I used MIN function, just for example, reform as you need.
- Creative_tree881 year agoHelper V
Bibiano_Geraldo Thanks, but when I add that, I don't get any data at all. The errors are gone, yes, but no data is populated...?