SSRS Query select filter then select

jon maj 20 Reputation points
2024-01-10T21:00:13.7766667+00:00

I am ultimately wanting to create a bar chart. I have two sets of data that I need to filter and combine into each bar of the graph. The only way I am showing to input data into one bar of a graph is to have it all in one data set Is it possible in one query to do something that allows me to filter one selection of data by value a, filter another selection of data by value b and then combine them. If not is there a way for me to achieve the bar chart. For example I would sort set 1 to just get anything with the first column = 1 I would then filter set 2 to just get anything with the first column = b Then I would combine both sets of data by mach column.

Set 1		
1	1/10/2024	mach1
2	1/9/2024	mach1
3	1/8/2024	mach2
4	1/10/2024	mach2
1	1/8/2024	mach2
2	1/7/2024	mach1
3	1/10/2024	mach1
4	1/10/2024	mach2
		
Set 2		
a	1/10/2024	mach1
b	1/9/2024	mach1
c	1/8/2024	mach2
d	1/10/2024	mach2
a	1/8/2024	mach2
b	1/7/2024	mach2
c	1/10/2024	mach1
d	1/10/2024	mach1

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,996 questions
0 comments No comments
{count} votes

Accepted answer
  1. AniyaTang-MSFT 12,451 Reputation points Microsoft Vendor
    2024-01-11T01:46:39.3166667+00:00

    Hi @jon maj I don't quite understand what you mean by combination. According to the example you mentioned, get the content of the first column = 1 in set 1, and get the content of the first column = b in set 2. Then combine based on match items, like this?

    1 1/10/2024 mach1 b 1/9/2024 mach1
    
    

    Please tell me more details. Best regards, Aniya

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.