This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
All,
I am showing a running total of counts for the past 2 years. The chart is getting too wide for my customer. I need to keep the totals based on the entire time period. But I would like to only show the last 12 months. The X-axis has a Start and End Date but I don't see a way to make it dynamic based on my live data. I could hard code the dates but then I would have to change it manually each month as I am in the screen shot below.
Any ideas? Or different charts I should use?
I am using the latest PBIRS (on premises).
Thanks in advance, Scott
Solved! Go to Solution.
Hi @wskallmeyer
You may create a measure like below and use it in visual level filter and set it =1.
Last 12 Month =
VAR EndThisMonth =
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 31 )
VAR Enddate_LastMonth =
EDATE ( EndThisMonth, -1 )
RETURN
IF (
MAX ( 'Date'[Date] ) <= Enddate_LastMonth
&& MAX ( 'Date'[Date] ) > EDATE ( EndThisMonth, -13 ),
1
)
Regards,
Hi @wskallmeyer
You may create a measure like below and use it in visual level filter and set it =1.
Last 12 Month =
VAR EndThisMonth =
DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 31 )
VAR Enddate_LastMonth =
EDATE ( EndThisMonth, -1 )
RETURN
IF (
MAX ( 'Date'[Date] ) <= Enddate_LastMonth
&& MAX ( 'Date'[Date] ) > EDATE ( EndThisMonth, -13 ),
1
)
Regards,
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 31 | |
| 23 | |
| 15 |
| User | Count |
|---|---|
| 76 | |
| 59 | |
| 32 | |
| 31 | |
| 26 |