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
fradan
New Member

monthly report - creating a line which displays 13 months from July to July

Hello everybody! Nice to meet you all!

I would need help ona  matter which is driving me crazy. For a monthly report I need to create a line graph which shows on the x-axis 13 months (July-August-September-October-November-December-January-February-March-April-June-July). The graph should have 2 different time lines: one showing data regarding the current 13 months, the other one data regarding the past ones. My dataset covers 26 months of data, from the 1st June 2021 to the 31st July 2023. Could someone help me with that? I have already created the PeriodLabel to show the different lines, but the months are displayed from January to December. Thank you very much in advance!

6 REPLIES 6
technolog
Super User
Super User

I hope this message finds you well. I've noticed that this solution remain unresolved. If any of you have managed to find a resolution to the issue, I kindly request that you share your solution for the benefit of the entire community. Alternatively, if you're still facing challenges, please do let us know as well.

Your insights and updates will greatly assist others who might be encountering the same challenge.

fradan
New Member

 I have it. This is my table looks like:

fradan_0-1693578177485.png

This is how I think it should be to get the graph I need:

fradan_1-1693578221825.png

 Thank you very much in advance

 

Greg_Deckler
Community Champion
Community Champion

@fradan So this can be done by using slicers to timebox your dates and then a measure to look back to 14-26 months. You would use ALL and then impose your own filters, maybe using EOMONTH to dial back the clock essentially. The specific solution is very dependent on your data.

 

Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you very much for your helf! I'm not sure I can geta  sample dataset, but that would be the expected output:

fradan_0-1693574495230.png

 

@fradan Literally all you would need is something like the following. Does this accurately represenet your data, you have Date and a Value? Like the table created by this DAX:

Table2 = 
ADDCOLUMNS(
    CALENDAR(
        DATE( 2021, 1, 1),
        DATE( 2023, 12, 31)
    ),
    "Value", RANDBETWEEN(10, 100)
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

My dataset has more than 20 columns 😞 Will be ok for me to create a random dataset with just months,years and random values?

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.