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.
I have a measure that calculates based on the amount for the month of the last sales with the previous month when there were sales
Prev last MTD Sales = CALCULATE (SUM ('Добавить1'[Количество изделий всего, шт]), PREVIOUSMONTH(DATESMTD ('Добавить1'[Дата выдачи])))
But he does not always see the previous month of sales, how to fix it?
Solved! Go to Solution.
@DeEviloN , Try like
Last Month non Continuous = CALCULATE([sales],filter(ALL('Date'),eomonth('Date'[Date]) =eomonth( CALCUALTE( MAx(Table[Date]), FILTER(ALL('Date'),'Date'[Date]<max('Date'[Date]))),0)))
@DeEviloN , You have to try like
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
previous month value = CALCULATE(sum('Table'[total hours value]),previousmonth('Date'[Date]))
This method does not work as the specified client made the payment in October, and before that in August
@DeEviloN , Try like
Last Month non Continuous = CALCULATE([sales],filter(ALL('Date'),eomonth('Date'[Date]) =eomonth( CALCUALTE( MAx(Table[Date]), FILTER(ALL('Date'),'Date'[Date]<max('Date'[Date]))),0)))
In your case, when you write a formula without specifying the month and close the parentheses, you get an error
help please, in the case when I put 1, then he counts the previous month, when 0 does not see it, but when choosing another client at 0 he sees the previous month, and at 1 not, how to fix it?
Prev last MTD Sales = CALCULATE (SUM ('Добавить1'[Количество изделий всего, шт]), FILTER(ALL('Добавить1'[Дата выдачи]),EOMONTH('Добавить1'[Дата выдачи],0)=EOMONTH(CALCULATE(MAX('Добавить1'[Дата выдачи]),FILTER(ALL('Добавить1'[Дата выдачи]),'Добавить1'[Дата выдачи]<max('Добавить1'[Дата выдачи]))),0)))
What does ('Table'[total hours value]?
@DeEviloN , Just a different measure in example ,
like
MTD = CALCULATE(SUM ('Добавить1'[Количество изделий всего, шт]),DATESMTD('Date'[Date]))
last MTD = CALCULATE(SUM ('Добавить1'[Количество изделий всего, шт]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
previous month = CALCULATE(SUM ('Добавить1'[Количество изделий всего, шт]),previousmonth('Date'[Date]))
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |