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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
simona0808
Helper I
Helper I

SSRS Report

Hello everyone.

I am working on an SSRS report(not very complicated).

In a nutshell, I have one dataset(including 4 columns I want to display in the table in the report) and a second dataset called - Parameters including 2 columns( the 2 parameters I want to render the information). 

I don't want duplicated values in the dropdown list with parameters so I am adding them in the query filed using the following command line of code: SELECT DISTINCT Name FROM iCustomerNames

It works fine with one column. However I noticed if I add an extra column to the expression: SELECT DISTINCT Name, ProductName FROM iCustomerNames. the distinct keyword is not working anymore and the duplicate values are in the dropdown. 

Does someone have an idea how can I fix this?

I tried creating 2 separate datasets for each of the parameters. It works but I am not sure if this is a good approach.

 

I will be very happy to hear your thoughts!

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @simona0808 ,

 

It is feasible to use two datasets for two parameters.

If you want to use one dataset, you can use VB code to remove duplicate filter values from parameter drop-down. Please refer to this article for the exact steps.

SSRS: Remove Duplicate Filter Values from Parameter Drop-down using VB code 


Here are the results of my tests. Note that you should move the DummyNamesFilter parameter to the top of the NamesFilter parameter.

 

vkkfmsft_0-1655261668703.png

vkkfmsft_1-1655261750433.png

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-kkf-msft
Community Support
Community Support

Hi @simona0808 ,

 

Has your problem been solved? If it is solved, please mark a reply which is helpful to you.

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.


Best Regards,
Winniz

v-kkf-msft
Community Support
Community Support

Hi @simona0808 ,

 

It is feasible to use two datasets for two parameters.

If you want to use one dataset, you can use VB code to remove duplicate filter values from parameter drop-down. Please refer to this article for the exact steps.

SSRS: Remove Duplicate Filter Values from Parameter Drop-down using VB code 


Here are the results of my tests. Note that you should move the DummyNamesFilter parameter to the top of the NamesFilter parameter.

 

vkkfmsft_0-1655261668703.png

vkkfmsft_1-1655261750433.png

 

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.