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,
I have two tables, ACTUAL SALES and FORECAST.
Actuals sales table only show the sales data upto July in this example. Month of July is a curent month and not completed yet::
Forecast table has historic and future data::
So, I would like to create two measures YTD (actuals) and YTG (forecast).
YTD: If Actuals Max Month-Year <> End of month then only sum previous months - example for Actuals table above YTD should only include Jan to Jun of 2020.
YTG: If Actuals Max Date-Month <> End of month then use forecast data for that and future months - example for Forecat table above YTG should only include Jul to Dec of 2020.
is it possbile create YTD and YTG based on above critiria please?
Thanks
Solved! Go to Solution.
@mb0307 , Not cleat, but seem like you need a measure like
Measure = if( eomonth(date[date],0) <=eomonth(today(),-1), sum(Sales[sales]), sum(Target[Target]))
then you can use ytd on it
Refer: https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Hi @mb0307 ,
Check this measure.
Measure =
IF (
FORMAT ( SELECTEDVALUE ( Actuals[yearmonth] ), "YYYYMM" )
< FORMAT ( TODAY (), "YYYYMM" ),
CALCULATE (
SUM ( Actuals[actual sales] ),
FILTER (
ALL ( Actuals ),
FORMAT ( Actuals[yearmonth], "YYYYMM" )
< FORMAT ( MAX ( Actuals[yearmonth] ), "YYYYMM" )
)
),
CALCULATE (
SUM ( Forecast[actual sales] ),
FILTER (
ALL ( Forecast ),
FORMAT ( Forecast[yearmonth], "YYYYMM" ) >= FORMAT ( TODAY (), "YYYYMM" )
&& FORMAT ( Forecast[yearmonth], "YYYYMM" )
<= FORMAT ( MAX ( Actuals[yearmonth] ), "YYYYMM" )
)
)
)
Best Regards,
Jay
@mb0307 , Not cleat, but seem like you need a measure like
Measure = if( eomonth(date[date],0) <=eomonth(today(),-1), sum(Sales[sales]), sum(Target[Target]))
then you can use ytd on it
Refer: https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
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 | |
80 | |
64 | |
52 | |
49 |
User | Count |
---|---|
217 | |
88 | |
76 | |
67 | |
60 |