Viewing 15 posts - 196 through 210 (of 3,396 total)
One way to do it is to create a stored procedure that returns just the rows and columns you want, and then call that from Excel.
you just specify the source...
September 30, 2022 at 4:55 pm
Something like this? (Well, it's a starting point!)
Oh right... nearly forgot MATCHED is a T-SQL keyword, and so is USER_ID
use tempdb;
go
create table matched
(match_id int identity not null...
September 29, 2022 at 10:47 pm
You're joking, right? This is database 101 stuff.
* How many days of data do we have ? DISTINCTCOUNT(date) from your data table?
* Counts of rows by each day
SELECT c.date, COUNT(*)...
September 21, 2022 at 11:13 pm
If you're going to consume this in SSRS, I'd write it in a stored procedure.
Look at windowing functions. You can expand the time window....
SELECT DimDate.Date, AVG([Amount]) OVER (PARTITION BY Date...
September 20, 2022 at 11:21 pm
Where are you doing your reporting? If you're doing it in Excel or PowerBI, use DAX, not T-SQL to calculate it.
September 20, 2022 at 10:43 pm
Let me rephrase my question... (Ask the wrong question, get a useless answer! LOL)
If the users are going do their own analyses with the data, then I would go the...
September 5, 2022 at 1:14 am
Is this for reporting? If you're using {SSAS Tabular, Excel, or PowerBI} then DAX is baked right in. "Use the force, Luke!"
The first book I read on DAX was Rob...
September 5, 2022 at 12:26 am
I think this may be destined to fail. Convincing him to do simple things like separating his personal and business purchases into separate receipts from Costco is a challenge. Hate...
September 3, 2022 at 12:08 am
Nobody's going to download a file that can have viruses in it.
Can you post at least some of it here?
August 30, 2022 at 4:04 pm
Split the datetime column into two columns, one for the date, and another one for the time. Then your calendar table will work. And you can create a time dimension...
August 25, 2022 at 11:06 pm
You can go to the FILTERS section in SSRS and add additional filters for your report. (And add parameters etc). So the "raw" dataset could pull say 100 records, and...
August 19, 2022 at 3:38 am
This is a bit of an odd question. Normally, if you have a date dimension table, you're working in a data warehouse, which means you're usually using either DAX or...
August 18, 2022 at 11:03 pm
Balance is basically a running total of deposits minus a running total of withdrawals. (Well, maybe starting with a monthly balance, because recalculating that all the time from the first...
August 18, 2022 at 3:17 pm
SELECT code, description, code + ' ' + description AS RandomColumn
FROM MyDB1.dbo.Table1
UNION
SELECT code, description, code + ' ' + description AS RandomColumn
FROM MyDB2.dbo.Table3
UNION
SELECT code, description, code +...
August 17, 2022 at 3:16 pm
looks okay if you're talking about the basic design. What did you intend to do with it?
August 14, 2022 at 6:56 pm
Viewing 15 posts - 196 through 210 (of 3,396 total)