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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Elliott
Advocate II
Advocate II

How to specify different time periods from the same source data

Hello,

 

I am having difficulty attempting to figure out an issue I am currently facing.

 

I shall keep it in simple terms as my issue can apply to several different scenarios. 

 

Issue:

I have a single source of data compromising of several different columns.

One of the columns I have created is Date which simply holds the date of each entry in the database.

 

I would like to create 2 graphs. For instance, the first graph I would like to display the last 7 days worth of my live data. The second graph I would like to show the last 30 days worth of data. 

How can I set these time parameters to allow to me make 2 graphs, using the same data source, but to display 2 different periods of time?

 

I understand that I can manually select the Date column in the level filters, but this will only allow me to manually select which days I would like to display. Whereas, what I am trying to achieve is a graph in which I will not have to manually change the selection every week and would like it to display the latest 7/30 days worth of data at that current time.

 

Is this possible to apply this at the presentation stage of creating the report, or is this something I will have to amend during the data manipulation, either on desktop or SQL (as this is where my data resides)?

 

Thanks alot,

Elliott

 

 

 

 

Edit:

 

Through some more research.. It's looks like I am going to have to introduce a mesure('s), if someone could point me in the right direction regarding this, that would be great Smiley Happy

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Create a new column with the formula:

 

Days Aging = DATEDIFF([Date],TODAY(),DAY)

 

This will give you number of days in the past and allow you to use it as a filter in your visualizations for last 7 days and last 30 days.



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...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Create a new column with the formula:

 

Days Aging = DATEDIFF([Date],TODAY(),DAY)

 

This will give you number of days in the past and allow you to use it as a filter in your visualizations for last 7 days and last 30 days.



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...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.