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.
Our financial year start from July to June. I want a cummlative sum that resets every financial year. I went through almost all the threads here and tried the formulas with no luck. Here is my DAX code:
Solved! Go to Solution.
Hi @shantanugupta ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a calculated column as below to get the financial year
Financial Year =
IF (
MONTH ( 'v_Usage'[UsageDate] ) >= 7,
YEAR ( 'v_Usage'[UsageDate] ) & "-"
& YEAR ( 'v_Usage'[UsageDate] ) + 1,
YEAR ( 'v_Usage'[UsageDate] ) - 1 & "-"
& YEAR ( 'v_Usage'[UsageDate] )
)
2. Create a measure as below to get the culmulative values by financial year
Measure =
CALCULATE (
SUM ( v_Usage[Used] ),
FILTER (
ALLSELECTED ( v_Usage ),
v_Usage[UsageDate] <= MAX ( v_Usage[UsageDate] )
&& v_Usage[Financial Year] = SELECTEDVALUE ( v_Usage[Financial Year] )
)
)
Best Regards
Hi @shantanugupta ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create a calculated column as below to get the financial year
Financial Year =
IF (
MONTH ( 'v_Usage'[UsageDate] ) >= 7,
YEAR ( 'v_Usage'[UsageDate] ) & "-"
& YEAR ( 'v_Usage'[UsageDate] ) + 1,
YEAR ( 'v_Usage'[UsageDate] ) - 1 & "-"
& YEAR ( 'v_Usage'[UsageDate] )
)
2. Create a measure as below to get the culmulative values by financial year
Measure =
CALCULATE (
SUM ( v_Usage[Used] ),
FILTER (
ALLSELECTED ( v_Usage ),
v_Usage[UsageDate] <= MAX ( v_Usage[UsageDate] )
&& v_Usage[Financial Year] = SELECTEDVALUE ( v_Usage[Financial Year] )
)
)
Best Regards
@shantanugupta ,with help from a date table and time intelligence
YTD Sales = CALCULATE(SUM ( v_Usage[Used] ),DATESYTD('Date'[Date],"6/30"))
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |