Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a list of campaigns, each record has a Start and Finish date associated with it.
I want to be able to get the MINX of Start, the MAXX of Finish, and populate another table with all the dates inbetween the lower and upper range. I am trying to use DATESBETWEEN but am stumbling on the syntax. E.g.
Measure = DATESBETWEEN(DateDimension[DateSK], MINX(Campaign_Report,Campaign_Report[Start]), MAXX(Campaign_Report,Campaign_Report[Finish]))
which doesn't return anything (no error either).... Could this be because I am trying to run this in a new table which already has one column populated in it:
Table = all(Campaign_Report[UID_CAMPAIGN] )
Can anyone give me a nudge in the right direction? Thanks
Solved! Go to Solution.
@Anonymous You should use New Table option under Modelling tab and then use DAX code you've got. From syntax it seems like you're trying to create a measure using DATESBETWEEN which returns table and so it is not working.
Thanks for your replies - manged to do it with:
Table = CALENDAR( minx(Campaign_Report,Campaign_Report[Start]), maxx(Campaign_Report,Campaign_Report[Finish] ))
@Anonymous You should use New Table option under Modelling tab and then use DAX code you've got. From syntax it seems like you're trying to create a measure using DATESBETWEEN which returns table and so it is not working.
Thanks for your replies - manged to do it with:
Table = CALENDAR( minx(Campaign_Report,Campaign_Report[Start]), maxx(Campaign_Report,Campaign_Report[Finish] ))
If you think the problem is solved, Can you please mark it as a solution. So the thread can be closed.
It seems to me that you are confused with your requirements. Can you please clearly explain what do you mean by
"populate another table with all the dates inbetween the lower and upper range." Posting Sample data and expected output would be highly appreciated.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |