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.
Hi All
My PBI file :-
https://www.dropbox.com/s/63sh9wwqwiymcek/PB_TDS_V048%20ask%20l6m%20SALES.pbix?dl=0
PAul
Solved! Go to Solution.
@Paulyeo11 , YTD was other topics or
You can have rolling of any months by replacing values
Rolling 2 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-2,MONTH))
Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
do you only consider month? Since i see you circle all Oct and Nov sales amount for both 2019 and 2020.
if I did not misunderstand your request. you can try this
Measure 2 =
VAR _max=max('SALES'[date])
VAR last1=month(_max)-1
VAR last2=month(_max)-2
RETURN CALCULATE(sum(SALES[sales]),FILTER(SALES,month(SALES[date])in {last1,last2}))
Proud to be a Super User!
Hi Ryan
Thank you for your sharing
Amit expression working fine
I make some mistake in the image , I only refer to same year
@Paulyeo11 , Try rolling formula, With date table
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))
If means every month will display 2 months of data '
In case you want two month with any selected date -https://www.youtube.com/watch?v=duMSovyosXE
Hi Amit
what i need is create a expression for compute last X month . I have change the expression from 12 to 11 , i hope to get YTD sales. Hope you can help me.
@Paulyeo11 , YTD was other topics or
You can have rolling of any months by replacing values
Rolling 2 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-2,MONTH))
Rolling 3 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |