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.
Hi all, working in Tabular Editor, I have created some calculation groups that measure YTD/MTD Year over Year growth %, but I would like to only calculate this for locations that had sales in the prior period/year. We've added many new locations in the past year and the growth numbers are obviously inflated because we've added 40 locations in the past 6 months.
Here's what I am using today for my QTD calculation measure.
Placeholder =
VAR CYQTD =
CALCULATE (
SELECTEDMEASURE (),
CALCULATETABLE ( DATESQTD ( 'Calendar'[Date] ), 'Calendar'[IsPast] = TRUE () )
)
VAR PYQTD =
CALCULATE (
SELECTEDMEASURE (),
CALCULATETABLE (
DATEADD ( DATESQTD ( 'Calendar'[Date] ), -1, YEAR ),
'Calendar'[IsPast] = TRUE ()
)
)
VAR YOYQTD = ( CYQTD - PYQTD )
RETURN
DIVIDE ( YOYQTD, PYQTD )
@sublog , Assuming you have location[location] or table[location]
Change in your formula at the end
VAR YOYQTD = Sumx(values(Location[Location]), if(not(isblank(PYQTD)), ( CYQTD - PYQTD ), blank()))
RETURN
DIVIDE ( YOYQTD, PYQTD )
Okay, I replaced the VAR YOYQTD = ( CYQTD - PYQTD ) section with what you gave me above, but the numbers are not correct? I assume you meant location as the table that contains my locations?
Thank you, I will check on this and report back!
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 |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |