Adam Saxton hits on an important topic:
Can we use source control with Power BI? We get this question ALL THE TIME! Adam walks you through what your options are and how this works today with Power BI.
Read on to learn Adam’s answer.
Comments closedA Fine Slice Of SQL Server
Adam Saxton hits on an important topic:
Can we use source control with Power BI? We get this question ALL THE TIME! Adam walks you through what your options are and how this works today with Power BI.
Read on to learn Adam’s answer.
Comments closedErik Darling adds some commas:
Sometimes it’s hard to get people to understand the scale of a number without some commas.
I don’t know why that is, but that’s why I added the option to format numbers.
You can do that by running the procedure like so:
If only the client tools worked that easily.
Comments closedToday, I want to go over what Virtual Log Files are and how to handle them if you have too many in your databases.
A SQL Server log file is made up of smaller files called Virtual Log Files (VLFs). As the log file grows, so will the count of VLFs. I haven’t seen or heard of a calculation that can be worked out to determine how many VLFs you should have or how many is too many for a database. I’ve heard that you shouldn’t have more than a few hundred. I’ve also heard to not worry about VLFs until you break 1000. If you check your databases and have thousands in a database, I would say it’s best to get that count lowered whether you’re seeing issues yet or not.
Read on to see how.
Comments closedHolger von Jouanne-Diedrich explains the results of a poll:
Some time ago I conducted a poll on LinkedIn that quickly went viral. I asked which of three different coin tossing sequences were more likely and I received exactly 1,592 votes! Nearly 48,000 people viewed it and more than 80 comments are under the post (you need a LinkedIn account to fully see it here: LinkedIn Coin Tossing Poll).
In this post I will give the solution with some background explanation, so read on!
Read on to understand why it’s just as likely that you’ll see a sequence, when flipping a coin, of H,H,H,H,H,H just as often as you’ll see H,T,H,T,H,T.
Comments closedMira Celine Klein shows how to benchmark R code performance:
Let’s assume you have written some code, it’s working, it computes the results you need, but it is really slow. If you don’t want to get slowed down in your work, you have no other choice than improving the code’s performance. But how to start? The best approach is to find out where to start optimizing.
It is not always obvious which part of the code makes it so slow, or which of multiple alternatives is fastest. There is the risk to spending a lot of time optimizing the wrong part of the code. Fortunately, there are ways to systematically test how long a computation takes. An easy way is the function
system.time
. Just wrap your code into this function, and you will (in addition to the actual results of that code) get the time your code took to run.
But that’s not the only route—read on to learn about other techniques as well and see them in action.
Comments closedAaron Bertrand shows off a great use for calendar tables in gap and island style queries:
In my previous article I revisited the concept of a calendar table, and explained some ways to use this data for business date calculations. This time, I wanted to explore how you can use the calendar table to simplify generating date ranges, and some query challenges this can help you simplify.
Click through for examples of the sorts of gap and island problems you can solve fairly easily with a calendar table. For an even simpler example, many BI reports want to see days even where there is no data, and a calendar table gives you that capability.
Comments closedPatrick LeBlanc shows us how to build data-driven subscriptions using Power BI and Power Automate:
Automate data driven subscriptions with the Power Platform using Power BI and Power Automate! Patrick shows you how to quickly setup a report bursting option for your reports.
Click through for the video. There are a few more steps compared to what you’d do in Power BI Reporting Services, but it’s still pretty straightforward.
2 CommentsErik Darling continues a series on sp_QuickieStore:
What good is writing all this dynamic SQL and whatnot if you’re just going to firehose data at people?
None. None at all.
You’re going to want to answer questions about what happened and when, and you’re not going to want to struggle with it.
So what can you do?
Read on to learn what you can do.
Comments closedEitan Bluman shows off some math skills:
Mathematical addition and subtraction can be performed between two datetime data types:
SET
@d2 = '1900-03-30 18:00'SELECT@d1 + @d2 -- result: 1900-04-01 10:15:15.900, @d1 - @d2 -- result: 1899-10-05 22:15:15.900, @d2 - @d1 -- result: 1900-03-29 01:44:44.100
This means that we can have basic datetime arithmetics in SQL server. We can use subtraction to find an accurate difference between two dates, and use addition to add an accurate interval to a datetime column or variable.
This is one of those things you can do, but I’m not very fond of. First of all, as Eitan points out, you can’t do these in the (in all ways superior) DATETIME2 data type. Secondly, it adds some confusion to the code, as you don’t always get what you expect.
Comments closedBarney Lawrence continues a series on XML processing in SQL Server:
This post looks at a problem that can come up in XML messages that have perhaps not been thought out as well as we’d like and where we can’t uniquely identify one instance of a repeating element. The example we’ve used so far avoids this problem so we’ll switch to a sample that illustrates this problem.
Read on for the crux of the problem, as well as solutions.
Comments closed