Forum Discussion
ChihiroWa
3 years agoFrequent Visitor
DATESBETWEEN function error
Hi, I hope someone help me with a DATESBETWEEN function error. Prepared tables are like below: Table A : a period of item production Country Segments Item name Period - start Period - ...
ChihiroWa
3 years agoFrequent Visitor
danextian ,Thanks a lot!
I found using DATESBETWEEN is not a good way to solve my problem.
If you have, could you tell me some other better ways ?
danextian
3 years agoSuper User
The answer really depends on your use case but information provided isnt enough to propose more appropriate one. What is the data used in your area chart? Is that volume? If so, your field pane should look something like this.
Also, the formula below will not even return a table of dates as you are comparing a year against a date.
=
DATESBETWEEN (
'TableB'[CY],
FIRSTDATE ( 'TableA'[Period - start] ),
LASTDATE ( 'TableA'[Period - end] )
)
Just DATESBETWEEN should be something like this. In your example, CY is year.
DATESBETWEEN(<Dates>, <StartDate>, <EndDate>)