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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Michele_Zanoni
Frequent Visitor

Data import of daily data

Hello all,

 

I'd like to submit a problem. We have a SQL Database on Azure and would like to create a dashboard/report that shows daily data (as in, the data relative to the day prior to the actual one). What we implemented as solution was to start with creating a report, use Import Data when initializing the dataset and in the advance option use the following query:

 

select * from [database].[table]

where A  = DATEADD(dd, -1, convert(date, getdate()))

 

The column A is the column of the date.

We then set, from our Power BI account, to have the dataset be refreshed daily (half an hour after midnight). In our mind, the dataset should be refreshed once a day so that everyone visualizing the dashboard/report would see the data relative to the prior day.

 

1) Is it correct?

2) Is it the best day to obtain what we would like, or are there better (cleaner, less complex) ways?

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

That seems like a pretty clean way to do it honestly. You are attacking the data at the source which should be the most efficient way of doing it. Otherwise, you'd have to import more data than you need and do like a "Days Ago" measure/column and a filter.


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

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

That seems like a pretty clean way to do it honestly. You are attacking the data at the source which should be the most efficient way of doing it. Otherwise, you'd have to import more data than you need and do like a "Days Ago" measure/column and a filter.


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

Thank you for your prompt answer, Greg.

No problem. If you feel that is the answer, please mark it as the accepted solution. The mods are on a tear about getting solutions marked as accepted answers.


@ 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors
Top Kudoed Authors