Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all,
I am building a rolling 13 month net revenue chart and I've came across a requirement to show the last 13 month in x axis based in what month (YYYYMM) the user selected in a YYYYMM slicer.
The chart below is the one I want:
In order to get the intended behaviour, currently I need to select each one of the 13 month in YYYYMM slicer:
Any ideas on how I can get this to work in Power BI so that the user just have to select the base month?
Thanks in advance,
Cristhian.
Solved! Go to Solution.
Hi again 🙂
I understand now, and I tried second approach. I created two tables, which are not related to any of tables. One is Year, with one column (values: 2010, 2011, 2012... 2016). Another is Month, with one column (values: 1,2,3...12).
Then I created this measure:
Sum of profit = var Ldate = date(max('Year'[Year]);max('Month'[Month]);1) //Last date var Fdate = EDATE(Ldate;-13) //First date var SumProfit = sum('traffic'[profit]) //Calculation return if(min('Date table'[Date])<fdate; blank(); if(min('Date table'[Date])>Ldate; blank(); SumProfit))
On x axis I added all months and years (2010-1, 2010-2 .... 2016-12) and in value I added measure.
Show items with no data must be unchecked.
Hi Michael,
Thanks for your reply.
Let's wait for the better time range filters arrive. For now, our client will use the YYYYMM slicer and the timeline slicer.
-Cristhian.
Hi Cristian,
Can we leverage the power of DAX to deploy your specific requirement.
DAX can polish your measure in a way that whenever end user selects the specific month, it will show last 13 months of rolling revenue.
Let me know if I can help you further.
Thanks & Regards,
Bhavesh
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |