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.
Hi Community,
How to calculate Half Year to Date and Week to Date from date Field using measure?
Thanks in advance,
Sowmiya
Hi @Sowmiya
Follow Sowmiya's suggestion, you could use YTD, MTD, QTD,WTD,DTD, Half -Year in the measure to calculate the values.
Addition to that, according to your previous post, what you want is partly achieved in Power BI currently.
Per your requirement, the relative date slicer gets us close to this with the “last”, “this”, “next”, of “Day”, “Week”, “Month” or “Year” settings. That is a dynamic date selection that updates based on the current system date.
Please find more details here.
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Currently it doesn't support "Quarter" and "Half year", please vote for this idea to improve this feature
To workaround this, you could create timeperiod slicer, for example
http://analyticsavenue.com/power-bi-timeperiod-slicer-for-last-7-dayslast-30-days/
Best Regards
Maggie
This article might give you some clues of different methods to approach you problem with:
https://www.daxpatterns.com/time-patterns/
For some non-standard period, such as half year, i'd suggest getting this placed into the date table so you can do your half year to date by filtering on these half year markers. For example inside your date table, you could create a field that uses a simple if statement that says "IF month number <= 6 then the HalfYear is the YEARVALUE concatinated with 1, else the HalfYear is the YEARVALUE concatinated with 2"
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |