March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Friends,
I have completed following an amazing thread of half year time intelligence:
https://amitchandak.medium.com/half-year-time-intelligence-b8ba09b90b9e
I was hoping to get some support here with my formula for LHYTD - last half year to date as I require some customizations:
LHYTD = CALCULATE([Net], FILTER(all('Calendar'), 'Calendar'[Half Year Rank] = max('Calendar'[Half Year Rank])-1 && 'Calendar'[Day of Half] <= max('Calendar'[Day of Half])))
Currently, this formula will calculate all Sales from dates Jul-Dec since my date table is uploaded for entire year 2023. This is because it thinks dates up to Jun 30th, 2023 is complete vs. using today's date.
When comparing Half to date as of today May 29th, there are 134 days with sales. This was calculated using:
Hi @Dlahey,
You can try to use the following measure formula to get the rolling previous half year to date results based on current date:
LHYTD =
VAR currDate =
MAX ( 'Calendar'[Date] )
RETURN
CALCULATE (
[Net],
FILTER (
ALLSELECTED ( 'Working_Days' ),
Working_Days[Is blank sales] > 0
&& 'Working_Days'[Date]
>= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, 1 )
&& 'Working_Days'[Date] <= currDate
)
)
Regards,
Xiaoxin Sheng
thank you so much for your time and expertise. I think this gets me really close to my desired solution.
my var currDate = 12/31/2023
is there a way to add to the variable max date = working_days.[date] where blank sales are >0?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |