cancel
Showing results for
Did you mean:
Frequent Visitor

## Growing value

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))

1 ACCEPTED SOLUTION
Super User IV

@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])))

Proud to be a Super User!

5 REPLIES 5
Frequent Visitor

I create this measure but not working

Kiekis viso 2020 (aug.) = CALCULATE([Kiekis 2020 m.(men.)],
FILTER(ALLSELECTED(Kalendorius),
Kalendorius[Date]<=MAX(Kalendorius[Date])))
Super User IV

@ramse , this seems like a cumulative measure.

what is the formula for [Kiekis 2020 m.(men.)] ?

Proud to be a Super User!

Frequent Visitor

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))

Super User IV

@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])))

Proud to be a Super User!

Super User IV

@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

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e

Proud to be a Super User!

Announcements