cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ramse
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

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

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

5 REPLIES 5
ramse
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])))

@ramse , this seems like a cumulative measure.

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

amitchandak
Super User IV
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
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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors