Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear Power BI Community, @PowerBI
I hope this message finds you well. I am reaching out because I am seeking assistance with a specific task in Power BI.
I am working on a project where I need to display the number of records from a table in a card visual, and I would like this count to dynamically change based on a slicer selection from a parameter field.
Could you please provide guidance or assistance on how to achieve this functionality in Power BI?
Thank you in advance for your help and support.
Best regards,
Jagadish Prasad
Solved! Go to Solution.
Hi @Jagadish_Prasad
The measure to achieve a goal is simple:
wanted measure = countrows ('your_table'), it will work with the slicers context.
According to the field parameters, please
provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Certainly! Here’s the revised approach with additional spacing:
1. Create a Dynamic Filter Measure:
Develop a DAX measure that will manage the filtering based on the selected Production Role. This measure will determine whether to display rows in your report depending on whether the 'Intern' role contains null values.
```DAX
Role Filter =
VAR SelectedRole = SELECTEDVALUE('Assignment'[Production Role])
RETURN
IF(
SelectedRole = "Intern",
IF(
ISBLANK('Assignment'[Intern Name]),
BLANK(),
1
),
1
)
```
This measure checks if the selected role is "Intern" and if the 'Intern Name' is blank. If both conditions are met, it filters out the row by returning BLANK(); otherwise, it keeps the row.
2. Apply the Measure in Your Visuals:
Place the "Role Filter" measure as a filter in your table and card visuals. Set this filter to show items when the value is 1. This configuration will hide rows for null 'Intern' names when "Intern" is selected and will not affect the display of other roles.
3. Test the Setup:
After implementing the measure, test your dashboard by selecting different roles from your field parameter slicer. This will help ensure that the table and cards are responding correctly to the role selection, particularly filtering out the assignments without an 'Intern' only when that role is selected.
This approach will help maintain the dynamic and interactive quality of your dashboard, ensuring data is displayed appropriately based on user-selected criteria. If you encounter any issues or have additional requests, feel free to reach out for more assistance!
Certainly! Here’s the revised approach with additional spacing:
1. Create a Dynamic Filter Measure:
Develop a DAX measure that will manage the filtering based on the selected Production Role. This measure will determine whether to display rows in your report depending on whether the 'Intern' role contains null values.
```DAX
Role Filter =
VAR SelectedRole = SELECTEDVALUE('Assignment'[Production Role])
RETURN
IF(
SelectedRole = "Intern",
IF(
ISBLANK('Assignment'[Intern Name]),
BLANK(),
1
),
1
)
```
This measure checks if the selected role is "Intern" and if the 'Intern Name' is blank. If both conditions are met, it filters out the row by returning BLANK(); otherwise, it keeps the row.
2. Apply the Measure in Your Visuals:
Place the "Role Filter" measure as a filter in your table and card visuals. Set this filter to show items when the value is 1. This configuration will hide rows for null 'Intern' names when "Intern" is selected and will not affect the display of other roles.
3. Test the Setup:
After implementing the measure, test your dashboard by selecting different roles from your field parameter slicer. This will help ensure that the table and cards are responding correctly to the role selection, particularly filtering out the assignments without an 'Intern' only when that role is selected.
This approach will help maintain the dynamic and interactive quality of your dashboard, ensuring data is displayed appropriately based on user-selected criteria. If you encounter any issues or have additional requests, feel free to reach out for more assistance!
Hi @Jagadish_Prasad
The measure to achieve a goal is simple:
wanted measure = countrows ('your_table'), it will work with the slicers context.
According to the field parameters, please
provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
User | Count |
---|---|
75 | |
74 | |
44 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |