Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Is there a way to calculate DATESINPERIOD between 2 dates?
e.g. DATE(2020,03,01) TO DATE(2021,02,28)
I currently have a calculation to get 365 days ago from today but I need from 1st March 2020 to 28th February 2021:
Solved! Go to Solution.
Hi @Anonymous ,
Try DatesBetween
01 Annual % Counts =
CALCULATE (
[01 No. of Counts] / [00 Total Delivered],
DATESBETWEEN (
'looker_views lkr_Questionnaire'[Questionnaire_DateTime],
DATE(2020,03,01) , DATE(2021,02,28)
)
)
01 Annual % Counts =
VAR a =
DIVIDE (
[01 No. of Counts],
[00 Total Delivered]
)
RETURN
CALCULATE (
a,
DATESBETWEEN (
'looker_views lkr_Questionnaire'[Questionnaire_DateTime],
DATE(2020,03,01) , DATE(2021,02,28)
)
)
https://radacad.com/datesinperiod-vs-datesbetween-dax-time-intelligence-for-power-bi
Regards,
Harsh Nathani
Hi @Anonymous ,
Try DatesBetween
01 Annual % Counts =
CALCULATE (
[01 No. of Counts] / [00 Total Delivered],
DATESBETWEEN (
'looker_views lkr_Questionnaire'[Questionnaire_DateTime],
DATE(2020,03,01) , DATE(2021,02,28)
)
)
01 Annual % Counts =
VAR a =
DIVIDE (
[01 No. of Counts],
[00 Total Delivered]
)
RETURN
CALCULATE (
a,
DATESBETWEEN (
'looker_views lkr_Questionnaire'[Questionnaire_DateTime],
DATE(2020,03,01) , DATE(2021,02,28)
)
)
https://radacad.com/datesinperiod-vs-datesbetween-dax-time-intelligence-for-power-bi
Regards,
Harsh Nathani
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |