Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have scenario where I have to filter sales for last 3 months based on current Month.
Ex: If Selected Month is March which has maximum date 11th (11-Mar-2021) . I'll need to calculate for Last 3 months excluding current Month i.e. neet to get the vaule of Feb 2021 ,Jan 2021,Dec 2020.
current formula :
Solved! Go to Solution.
Hi @Easley06
Please try
P3 =
VAR CurrentDate =
MAX ( DATE_SYSTEM[DATE] )
VAR EndDate =
EOMONTH ( CurrentDate, - 1 )
VAR StartDate =
EOMONTH ( CurrentDate, - 5 ) + 1
RETURN
CALCULATE (
SUM ( FACT_OFF_TAKE[GROSS_AMT] ),
DATE_SYSTEM[DATE] >= StartDate,
DATE_SYSTEM[DATE] <= EndDate,
ALL ( DATE_SYSTEM[MONTH_NAME], DATE_SYSTEM[MONTH], DATE_SYSTEM[YEAR] )
) / 3
Hi @Easley06
Please try
P3 =
VAR CurrentDate =
MAX ( DATE_SYSTEM[DATE] )
VAR EndDate =
EOMONTH ( CurrentDate, - 1 )
VAR StartDate =
EOMONTH ( CurrentDate, - 5 ) + 1
RETURN
CALCULATE (
SUM ( FACT_OFF_TAKE[GROSS_AMT] ),
DATE_SYSTEM[DATE] >= StartDate,
DATE_SYSTEM[DATE] <= EndDate,
ALL ( DATE_SYSTEM[MONTH_NAME], DATE_SYSTEM[MONTH], DATE_SYSTEM[YEAR] )
) / 3
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
10 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |