Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

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

 

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

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

 

amitchandak
Super User
Super User

@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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.