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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Show data for latest 30 days when report opens

Hi All,

 

Do anyone has any idea of - How to show data for latest 30 days of refresh date when user opens the report intially. "Relative data doesn't work for my requirment( as refresh dates doesn't concrete with system dates)". so please do not think abt relative date option

7 REPLIES 7
sanimesa
Post Prodigy
Post Prodigy

@AnonymousSo you do not actually want to show data for the most recent 30 day interval but for 30 instances of data points, is this  correct?

Option 1. Assuming you have an actual date column in data, you can create measure that will calculate a sequence number for each date.

Option 2. Create a view with an auto increment column which will contain a running refresh count.

 

Then you will simply create a filter where you select the last 30 values of this sequence or count. This is all I can think of without looking at the data.

 

 

Anonymous
Not applicable

@sanimesa ,

Can you give more info on 2 options provided. How to achieve those?

amitchandak
Super User
Super User

@Anonymous ,

Try like

Is last 30 = if('Date'[Date]>=TODAY()-30,"Last 30 Day","Before last 30 Day")

Use this a the filter

 

 

Appreciate your Kudos.

https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184

Greg_Deckler
Super User
Super User

Well, generally the way people do this is to create a column in their table that is something like:

Column = (TODAY() - [Date]) * 1.

Then they set some filter to be < 30 for this column. But I don't understand system dates versus refresh dates so you would have to explain that.

@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

Let me know where do they set the filter like <30 in report?

Anonymous
Not applicable

@Greg_Deckler 

Actually, My project is migration from Mainframe to Power BI. So my refresh dates will be the date at which report is taken from Mainframe server and few reports may be daily frequency, weekly, monthly, yearly..

 

So my Refresh dates are random

So, same basic concept but use

 

Column = MAX([Date]) - [Date]

 

?

 

You need to define what you mean by last 30 days. I don't understand that refresh dates are random. 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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