Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey,
How change this measure, to show calculate number growing (every month):
Kiekis 2020 m.(men.) =
var currentmonth = SELECTEDVALUE(Kalendorius[Mėnesio nr.])
var currentyear = SELECTEDVALUE(Kalendorius[Metai])
return
CALCULATE([Kiekis viso],
FILTER(ALL(Kalendorius),
Kalendorius[Mėnesio nr.] = currentmonth &&
Kalendorius[Metai] = currentyear - 1))
Solved! Go to Solution.
@ramse , this seems like last year same month. for that try
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Previous year Month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-11,MONTH)))
Cumulative till a year back
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=maxx(date,dateadd(date[date]),-1,year)))
till date
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))
I create this measure but not working
@ramse , this seems like a cumulative measure.
what is the formula for [Kiekis 2020 m.(men.)] ?
this formula :
Kiekis 2020 m.(men.) =
var currentmonth = SELECTEDVALUE(Kalendorius[Mėnesio nr.])
var currentyear = SELECTEDVALUE(Kalendorius[Metai])
return
CALCULATE([Kiekis viso],
FILTER(ALL(Kalendorius),
Kalendorius[Mėnesio nr.] = currentmonth &&
Kalendorius[Metai] = currentyear - 1))
@ramse , this seems like last year same month. for that try
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Previous year Month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-11,MONTH)))
Cumulative till a year back
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=maxx(date,dateadd(date[date]),-1,year)))
till date
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))
@ramse , not very clear, but you have to use time intelligence with the date table. Refer these two
Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA
Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA
User | Count |
---|---|
128 | |
109 | |
100 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |