Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Hi Geeks,
I am facing syntax issue. When I am trying to use Datesbetween function in Dax while using Evaluate. I am using Azure Analysis Service as source and using import mode.
evaluate(filter('Date_Dim', [Calendar_dt]=DATEVALUE("2021-01-01")))
can someone please suggest correct syntax to use Datesbetween function in Evaluate.
Thank you.
Solved! Go to Solution.
@itsmebvk , I think, with import mode it should work
something like
calculateTable(table, DATESBETWEEN(table[Data], date(2019,09,01), date(2020,02,29)))
@itsmebvk , DATESBETWEEN return table , so this should work
evaluate(
DATESBETWEEN(DAte[Data], date(2019,09,01), date(2020,02,29))
)
@amitchandak Thanks for quick reply. I want to get all table columns but it should filter table only for between few dates. Is this expression works to achieve this requirement within evaluate function?
Can I also use Direct query mode while using Azure Analysis Service model as source?
Regards
BVK
@itsmebvk , I think, with import mode it should work
something like
calculateTable(table, DATESBETWEEN(table[Data], date(2019,09,01), date(2020,02,29)))
@amitchandak Thank you.
As suggested by you, I have used following expression and it worked like charm.
evaluate(calculateTable('Fact_Table',DATESBETWEEN('Fact_Table'[Calendar_dt],DATEVALUE("2021-01-01"),DATEVALUE("2021-01-03"))))
User | Count |
---|---|
90 | |
88 | |
88 | |
79 | |
49 |
User | Count |
---|---|
153 | |
145 | |
106 | |
74 | |
55 |