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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Refresh calculated tables dynamically based on slicer selection

@Greg_Deckler ,

 

We have a specific requirement of showing tabular data for two categories - Employee tested data and Not Tested data. These categories are shown on slicer. Initially thought of achieving this by using calculated tables that can be refreshed at run time or by using except function along with some other logic.

 

After lot of research, couldn't achieve it. Is there any provision to make it happen like in parametrized SSRS reports that can fetch data from database at run time ? Please suggest your inputs. Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mahoneypat ,

 

Tested data is not just a subset of data. It's not fixed. We need to change data of calculated tables dynamically based on slicer value / selections at run time. Tested / Not Tested data tables needs to be refreshed at run time. For now I have improvised it and created different physical tables for Tested and Not Tested both scenarios using Cross join as part of SQL script.

In Power BI then we can filter this dataset and toggle between them using cardinality (Many to Many) and this has been configured based on Slicer field. Thanks for your suggestion.

Let me know in case of any concerns.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

I'm afraid it's not available to create a calculated table dynamically based on slicer. Once the table was created, it won't be changed by the slicer value.

 

Best Regards,

Jay

Anonymous
Not applicable

Hi @Anonymous ,

 

Correct, we cannot change the data of calculated tables dynamically based on slicer value. Thanks for your suggestion.

Anonymous
Not applicable

@mahoneypat ,

 

Thanks for your inputs.

I have tried the second one bringing entire data and then adding a column in slicer but this won't work because Not tested set of data needs to be calculated at run time. Suppose user applied few filters and based on that viewing data for tested employees then those employees needs to be excluded from the master set to show Not tested scenario.

Hope this explanation helps. I will definitely try the first one. Meanwhile if you could suggest more inputs.

If your not tested data is just a subset of your data, you should have a single table and use measures to show/hide tested/not tested.  Please share some example/mock data and what your desired output is.  Even better to send a link to a pbix file.

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Hi @mahoneypat ,

 

Tested data is not just a subset of data. It's not fixed. We need to change data of calculated tables dynamically based on slicer value / selections at run time. Tested / Not Tested data tables needs to be refreshed at run time. For now I have improvised it and created different physical tables for Tested and Not Tested both scenarios using Cross join as part of SQL script.

In Power BI then we can filter this dataset and toggle between them using cardinality (Many to Many) and this has been configured based on Slicer field. Thanks for your suggestion.

Let me know in case of any concerns.

mahoneypat
Microsoft Employee
Microsoft Employee

Have you considered using query parameters?  You can make a parameter and use that value in your query.  If you save the file as a pbit (template file), the user will get prompted for which type of data they'd like.

https://docs.microsoft.com/en-us/power-query/power-query-query-parameters

 

Also, why not always bring in both sets of data appended into a single table, adding a column you can use as a slicer on your report (tested or not tested).

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.