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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
MJG2112
Advocate II
Advocate II

Dynamic Table Creation???

I've created some very simplfied mock data that hopefully explains what I'm trying to achieve for a user.  Tables A & B are imported.  Table C is a summarised from Table A, with columns added from Table B.  As you can see, Table A is at employee level and Table B is at team level.  Table C is also at team level.  Visual 1 is created using Table C.  So far so good.  However, my user also wants to see Visual 1 with the OT from Table A excluded.  How can I do this without creating a Table D and Visual 2?  Is it possible to keep dynamcially refreshing Table C based on a user choice of include/exclude OT?  I tried using a measure in the SUMMARIZE(FILTER...) that was based on button slicer but it resulted in an empty Table C.  
Screenshot 2025-12-08 221322.png

1 ACCEPTED SOLUTION

You are welcome.

Ashish_Mathur_0-1765279010149.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

9 REPLIES 9
danextian
Super User
Super User

  I tried using a measure in the SUMMARIZE(FILTER...) that was based on button slicer but it resulted in an empty Table C.  

You probably used SELECTEDVALUE ('table'[filter column]). In the context of a calculated table, there isn't a single value selected as calc tables are not aware of any slicer selection thus the filter value is blank resulting to a blank table.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1765237204093.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks @Ashish_Mathur This is great. The only tweak I need is for the hours values in the visual to be either REG+OT or just REG - not REG or OT. Can you help please?

You are welcome.

Ashish_Mathur_0-1765279010149.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you @Ashish_Mathur .  That's exactly what I need 😀

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
nielsvdc
Super User
Super User

Hi @MJG2112, you could solve this by only creating a relationship between Table A and Table C. Table B would not have to be related to any other table. Then create the measures below and you are able to combine all of these in a single or multiple tables.

 

Total hours = CALCULATE( SUM(TableA[Hours]) )
Total ADJ = CALCULATE( SUM(TableC[ADJ]) )
With OT = CALCULATE( [Total hours] - [Total ADJ] )
Without OT = CALCULATE( [Total hours] - [Total ADJ], TableA[REG/OT] <> "OT" )

 

nielsvdc_0-1765234435543.png

 

Hope this helps. If so, please give kudos 👍 and mark as Accepted Solution ✔️ to help others.

lbendlin
Super User
Super User

Is it possible to keep dynamcially refreshing Table C based on a user choice of include/exclude OT?

No.  Calculated Tables are computed once, and are not affected by user interaction.

 

You can have table variables inside a measure but the final result of that measure needs to be a scalar value.

@lbendlin, This needs to be said more often. I have heard many mealy-mouthed explanations of this, but yours is the clearest and most factual yet.

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.