Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
diederd
Helper II
Helper II

The last 12 Month from Today not displaying correctly on graph

Power BI community,

 

I have the following issue in that I've got some data in which I'm needing to report on; however there is a requirement to display a count of all breaches for the last 12 months (from today). I have a measure which correctly pulls the data; however this is not being correctly displayed on the line graph.

 

totalBreachLastYear = CALCULATE(COUNTROWS('Breaches Log'),DATESBETWEEN ('Calendar'[Date], NEXTDAY ( SAMEPERIODLASTYEAR (LASTDATE ( 'Calendar'[Date] ) ) ),LASTDATE ( 'Calendar'[Date] )))

 

I have data being imported from SharePoint Online, these tables are as follows:

 

  • BreachesLog
  • Calendar
  • TaxonomyHiddenList
  • User Information List

 

Picture1.png

 

These are the results that I'm getting:

 

Picture2.png

 

The data table is correct (showing 20 records for the previous 12 months), however the chart is showing completely incorrect.

 

Any assistance/guidance would be much appreciated.

 

Thank you.

1 REPLY 1
Anonymous
Not applicable

@diederd,

I note that you use MonthName field to create the chart, which table does the field come from? How about you create a YearMonth field in your table and use it as X-Axis in the chart?

In addition, could you please share sample data of Breaches Log table or PBIX file for us to analyze?

Regards,

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.