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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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.



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!:
Power BI Cookbook Third Edition (Color)

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.



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!:
Power BI Cookbook Third Edition (Color)

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.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.