Forum Discussion
Ajeck
Helper III
6 years agocomparation today
Deaer All, Can Any body help me? How I can get the total sales of a month (from 1 st day to end of month) how can i get end of month date (31 Jan, 28 Feb, 31 March, 30 Apr , etc....) Tha...
- 6 years ago
Please check if this is what you want.
Measure 2 = var MAXDATE=MAX('sales'[tanggal]) RETURN CALCULATE(SUM(sales[sales]),FILTER(sales,MONTH(sales[tanggal])=MONTH(MAXDATE)-1&&YEAR(sales[tanggal])=YEAR(MAXDATE))) Measure 3 = var MAXDATE=MAX('sales'[tanggal]) RETURN CALCULATE(SUM(sales[sales]),FILTER(ALL(sales),MONTH(sales[tanggal])=MONTH(MAXDATE)&&YEAR(sales[tanggal])=YEAR(MAXDATE)-1))
Ajeck
Helper III
6 years agoThankyou for helping me,
my goal is make a comparation between amount sales MTD (this month) vs total sales Last Month (full month, not MTD Last Month) and vs total sales same month in last year.
the value of Last Month I used this :
Full month of LM = CALCULATE([sales],DATESBETWEEN('Invoked Function'[Date],DATE(2019,09,1),DATE(2019,09,30)))
but I want to make start date and endDate becomes dinamic, so i must put endDate wiht End of Month
actually my Goal is to compare MTD vs Total sales Last Month (full month) vs Total Sales in the same Month of Last Year (full month) : 100 (MTD as 27 Sept) vs 300 (Full month of August) vs 350 (full month of Sept 2019)
what should I do ?
here is the file of PBI :
Thankyou very much
Rgds
Ajeck
ryan_mayu
Super User
6 years agoPlease check if this is what you want.
Measure 2 =
var MAXDATE=MAX('sales'[tanggal])
RETURN CALCULATE(SUM(sales[sales]),FILTER(sales,MONTH(sales[tanggal])=MONTH(MAXDATE)-1&&YEAR(sales[tanggal])=YEAR(MAXDATE)))
Measure 3 =
var MAXDATE=MAX('sales'[tanggal])
RETURN CALCULATE(SUM(sales[sales]),FILTER(ALL(sales),MONTH(sales[tanggal])=MONTH(MAXDATE)&&YEAR(sales[tanggal])=YEAR(MAXDATE)-1))
- Ajeck6 years ago
Helper III
Thankyou .....
this is what I want