The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello,
I want to filter my Parameter to only show values with data.
Example, I am pulling in a bunch of email addresses and using that as my Parameter. User selects an email address and a list of items shows for that email in the report.
What I would like is, if an email has no rows/items to display, then it isn't an option in the parameter.
So if I have these email addresses and a count of rows for each :
abc@email.com 5 rows
123@email.com 3 rows
me@email.com 0 rows
then the paramter in the report only gives you the option to select either "abc" or "123".
If that data changes the next day/week, i.e. "me" now has 2 rows and "abc" has 0, then the options to select are only "123" or "me".
If nothing has data, then nothing to select, else if it all does then I can select any email address.
Any help would be appreciated!
Solved! Go to Solution.
Hi, @MikeDubya
Based on your descriptive information, I have the following dataset:
Table1
Additionally, as you mentioned you have a table of email address statistics:
Table2
In Report builder first use dataset1 to create a dataset1, select Filters to filter the Count column to non-zero:
Create a new parameter:
Import table1 into report builder and create a dataset2:.
In filter, select fx, and set it to the parameter you just created:
After setting it up, the result of putting dataset2 into the table is as follows:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I was able to actually follow these steps and change the conditions a bit to fit my needs and it worked. Thanks for the help!
I should also mention that it is one Table, not two.
I apologize, I didn't do a good job giving example data. Let me try again.
What we have is a list of emails with dates.
Email Address | Date |
abc@email.com | 7/20/2024 |
abc@email.com | 7/21/2024 |
abc@email.com | 7/22/2024 |
123@email.com | 7/21/2024 |
123@email.com | 7/22/2024 |
123@email.com | 7/27/2024 |
123@email.com | 7/28/2024 |
me@email.com | 7/26/2024 |
me@email.com | 7/27/2024 |
me@email.com | 7/28/2024 |
me@email.com | 7/29/2024 |
We want to only see email addresses in the parameter where the date is within 7 days. So if todays date is 7/17/2024, based on the dates above, only these would appear:
abc@email.com |
123@email.com |
Then if we select an email, the report populates with the appropriate data. We have that part working. We just want to remove any emails with no rows that are within 7 days of "todays" date from the dropdown parameter.
I hope that makes a bit more sense. I do believe what you are showing is close but we couldn't get it to work based on how I had previously described the data. Does that change anything for you?
Hi, @MikeDubya
Based on your descriptive information, I have the following dataset:
Table1
Additionally, as you mentioned you have a table of email address statistics:
Table2
In Report builder first use dataset1 to create a dataset1, select Filters to filter the Count column to non-zero:
Create a new parameter:
Import table1 into report builder and create a dataset2:.
In filter, select fx, and set it to the parameter you just created:
After setting it up, the result of putting dataset2 into the table is as follows:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
80 | |
80 | |
48 | |
40 |
User | Count |
---|---|
150 | |
110 | |
64 | |
64 | |
58 |