Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Goal:
Data :
ind YEAR MON Figures 1 2020 JAN 12321 2 2020 FEB 344 3 2020 MAR 5000 4 2020 APR 325 5 2020 MAY 747 1 2019 JAN 54091 2 2019 FEB 349 3 2019 MAR 789 4 2019 APR 901 5 2019 MAY 2356
Desire Result:
Usage - Default filter as newest year = 2020 , user can select the specific single year to view the change in scorecard
ind YEAR MON Figures YTD Change 1 2020 JAN 12321 12321 0 2 2020 FEB 344 12665 344 3 2020 MAR 5000 17665 5000 4 2020 APR 325 17990 325 5 2020 MAY 747 18737 747 1 2019 JAN 54091 54091 0 2 2019 FEB 349 54440 349 3 2019 MAR 789 55229 789 4 2019 APR 901 56130 901 5 2019 MAY 2356 58486 2356
How can i achieve this ?
Solved! Go to Solution.
Hi @rane19 ,
Check the measures.
Measure = CALCULATE(SUM('Table'[Figures]),FILTER(ALLSELECTED('Table'),'Table'[YEAR]=SELECTEDVALUE('Table'[YEAR])&&'Table'[ind]<=MAX('Table'[ind])))
Measure 2 =
var lastmonth = CALCULATE(SUM('Table'[Figures]),FILTER(ALLSELECTED('Table'),'Table'[YEAR]=SELECTEDVALUE('Table'[YEAR])&&'Table'[ind]<=MAX('Table'[ind])-1))
return
IF(ISBLANK(lastmonth),0,[Measure]-lastmonth)
Result would be shown as below.
Best Regards,
Jay
Hi @rane19 ,
Check the measures.
Measure = CALCULATE(SUM('Table'[Figures]),FILTER(ALLSELECTED('Table'),'Table'[YEAR]=SELECTEDVALUE('Table'[YEAR])&&'Table'[ind]<=MAX('Table'[ind])))
Measure 2 =
var lastmonth = CALCULATE(SUM('Table'[Figures]),FILTER(ALLSELECTED('Table'),'Table'[YEAR]=SELECTEDVALUE('Table'[YEAR])&&'Table'[ind]<=MAX('Table'[ind])-1))
return
IF(ISBLANK(lastmonth),0,[Measure]-lastmonth)
Result would be shown as below.
Best Regards,
Jay
Amazing , it is exactly what i wanted.
@rane19 , My advice would be create a date table and join it with DAte table and use time intelligence
New column
Date = "01-" & [Month] & "-" & [year] // change Data type to date
measures
YTD Sales = CALCULATE(SUM(Table[Figures]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Table[Figures]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
diff = [YTD Sales] -[Last YTD Sales]
change = [YTD Sales] -SUM(Table[Figures])
Appreciate for the answer but what I am looking for is the accumulated total of Figures within each year at "YTD" column and the change (growth or drop) compare with last month's total and current month's total . Proposed answer looks Year to Year comparison
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |