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,
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
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 |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |