Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Good day all,
I am pretty new to Power Bi, loveing the program but stumbling accross something that I cannot figure out.
I sccuesfully managed to calculate the YTD turnover and compare it to the LYTD turnover.
My report has a filter on year. So now I have 2020 selected and I want to see the comparison with previous year.
I got it working with the LYTD using the following calculations:
Solved! Go to Solution.
Hi @Phoenix538 ,
You can try to create an unrelated calendar table to use as a slicer.
Running total:
Running total=
CALCULATE (
SUM ( Sales[Sales] ),
FILTER (
ALLSELECTED ( 'Sales' ),
SELECTEDVALUE(DimDate[year])= YEAR(Sales[Date])&&
Sales[Date]<=MAX(Sales[Date])
)
)
Sum of last year:
sum_Sales_last_year =
CALCULATE (
SUM( Sales[Sales] ),
FILTER (
ALL ( Sales[Date] ),
YEAR(Sales[Date]) = SELECTEDVALUE(DimDate[year])-1
))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Phoenix538 ,
You can try to create an unrelated calendar table to use as a slicer.
Running total:
Running total=
CALCULATE (
SUM ( Sales[Sales] ),
FILTER (
ALLSELECTED ( 'Sales' ),
SELECTEDVALUE(DimDate[year])= YEAR(Sales[Date])&&
Sales[Date]<=MAX(Sales[Date])
)
)
Sum of last year:
sum_Sales_last_year =
CALCULATE (
SUM( Sales[Sales] ),
FILTER (
ALL ( Sales[Date] ),
YEAR(Sales[Date]) = SELECTEDVALUE(DimDate[year])-1
))
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Greg ,
Thank you for the reply, but the LYTD i already have. However I am looking to have the total tunover of the year 2019 and not only to date.
I tried with
@Phoenix538 , Try the complete one if you looking for the full year
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(('Date'[Date]),"12/31"))
This Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD((ENDOFYEAR('Date'[Date])),"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Last YTD complete Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
Last to last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-2,Year),"12/31"))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
61 | |
59 |
User | Count |
---|---|
194 | |
111 | |
105 | |
79 | |
71 |