Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I work with aviation data.
I used TOTALYTD for the current year.
Problem.
Thanks in advance for all your help.
Solved! Go to Solution.
Hi,
This measure works
Measure = CALCULATE([Pax],DATESBETWEEN(_Calendar[Date],date(2019,1,1),date(2019,MONTH(max(_Calendar[Date])),day(MAX(_Calendar[Date])))))
Hope this helps.
Hi,
Share the download link of the PBi file.
Hi,
This measure works
Measure = CALCULATE([Pax],DATESBETWEEN(_Calendar[Date],date(2019,1,1),date(2019,MONTH(max(_Calendar[Date])),day(MAX(_Calendar[Date])))))
Hope this helps.
Thanks Ashish.
I experimented with DATESBETWEEN. It shows that you know what you're doing and I don't. 🙂
I have one more question.
Current Situation
Problem
Hi,
Does this measure work?
Measure = CALCULATE([Pax],DATESBETWEEN(_Calendar[Date],date(2019,1,1),date(2019,MONTH(maxx(ALL(_Calendar),_Calendar[Date])),day(MAX(_Calendar[Date]))))
Hi Ashish,
First I apologise for confusing the issue.
Your question:
Answer:
I have an observation where, if you see the screen shots from yesterday (05Jan2023), although my outer filter displays 11 months of the current year (in this case year 2022), the previous time series sum 12 months instead of 11.
I modified your code by adding an IF statment:
You are welcome. i do not understand your requirement at all. Have you tried the formula i posted yesterday?
You can get like
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
2nd last year =CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
3rd last year =CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-3,Year),"12/31"))
if you select all years in the visual then ytd should work for each year (the first formula)
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
Power BI Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U
Hello,
I appreciate the responses.
The YTD solution I recieved is similar to what I've done already.
In calendar year 2022, minus 3 years will give me year 2019 (2019 - 3 = 2019).
However, when the year changes to 2023, minus 3 gives me 2020.
The solution I hoped to arrive at is to have code and locks the result to year 2019. It's a maintenance issue. I wish to avoid having to remember to update the code every calendar year.
Your thoughts are welcomed.
And thanks to everyone for your responses. I truely do appreciate your responses.
Best wishes for the New Year 2023!
DAXRichard
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
185 | |
73 | |
73 | |
50 | |
42 |