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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sahar_nezhad
New Member

Convert a Calculated table to a Dynamic table

Hi ALL, I have created a dynamic table with following DAX, I need to create it in a way that can be sliced by a slicer which defines SelectedProject instead of defining it manually :

FinOpsProgressTimeline =
VAR SelectedProject = "FinOps"
VAR StartDate =
    CALCULATE(
        MIN('tr_projects'[tr_plannedstartdate]),
        'tr_projects'[tr_nickname] = SelectedProject
    )
VAR EndDate =
    CALCULATE(
        MAX('tr_projects'[tr_plannedfinishdate]),
        'tr_projects'[tr_nickname] = SelectedProject
    )
RETURN
ADDCOLUMNS (
    CALENDAR(StartDate, EndDate),
    "PlannedProgress%",
    VAR CurrentDate = [Date]
    RETURN
    SUMX (
        FILTER(
            'tr_highlevelwbses',
            RELATED('tr_projects'[tr_nickname]) = SelectedProject
        ),
        VAR TaskStart = 'tr_highlevelwbses'[tr_plannedstartdate]
        VAR TaskEnd = 'tr_highlevelwbses'[tr_plannedfinishdate]
        VAR Duration = DATEDIFF(TaskStart, TaskEnd, DAY) + 1
        VAR Elapsed = DATEDIFF(TaskStart, MIN(CurrentDate, TaskEnd), DAY) + 1
        VAR Progress =
            SWITCH (
                TRUE(),
                CurrentDate < TaskStart, 0,
                CurrentDate > TaskEnd, 1,
                TRUE(), Elapsed / Duration
            )
        RETURN Progress * 'tr_highlevelwbses'[tr_weightfactor]
    ),
        "ActualProgress%",
    CALCULATE(
        MAX('tr_projecthistoricaltrends'[tr_actualprogress]),  
        FILTER(
            'tr_projecthistoricaltrends',
            RELATED('tr_projects'[tr_nickname]) = SelectedProject &&
            'tr_projecthistoricaltrends'[tr_date] = [Date]
        )
    )
)
1 ACCEPTED SOLUTION
burakkaragoz
Community Champion
Community Champion

Hi @sahar_nezhad ,

 

To make your calculated table respond to a slicer selection, you’ll need to switch from a calculated table to a measure-based visual or use a calculated table inside a visual (like a matrix). Calculated tables are static at model load time and don’t respond to slicers.

Here’s what you can do instead:

Option 1: Use a Parameter Table + Measures

  1. Create a separate table with project names (if not already available).
  2. Use a slicer on that table.
  3. Replace VAR SelectedProject = "FinOps" with:
VAR SelectedProject = SELECTEDVALUE('Projects'[tr_nickname])

But again, this won’t work inside a calculated table. You’ll need to move the logic into a measure and use it in a visual like a matrix or line chart.

Option 2: Use a Paginated Report or Calculation Group

If you absolutely need a dynamic table output, consider using a paginated report or a calculation group to simulate dynamic table behavior.

Here’s a Microsoft doc that explains why calculated tables don’t respond to slicers:\ Microsoft Learn

Let me know if you want help converting your logic into a measure-based visual.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

Translation and formatting supported by AI

View solution in original post

5 REPLIES 5
v-achippa
Community Support
Community Support

Hi @sahar_nezhad,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @danextian and @burakkaragoz for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's resolved your issue? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @sahar_nezhad,

 

We wanted to kindly follow up to check if the solution provided by the user's resolved your issue? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @sahar_nezhad,

 

We wanted to kindly follow up to check if the solution provided by the user's resolved your issue? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

danextian
Super User
Super User

Hi @sahar_nezhad 

Calculated tables and columns are not aware of slicer selections so they won't update as you interact with a slicer. You will need to use a table (visual) with all the needed columns and use a measure to control what rows will be visible.





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.
burakkaragoz
Community Champion
Community Champion

Hi @sahar_nezhad ,

 

To make your calculated table respond to a slicer selection, you’ll need to switch from a calculated table to a measure-based visual or use a calculated table inside a visual (like a matrix). Calculated tables are static at model load time and don’t respond to slicers.

Here’s what you can do instead:

Option 1: Use a Parameter Table + Measures

  1. Create a separate table with project names (if not already available).
  2. Use a slicer on that table.
  3. Replace VAR SelectedProject = "FinOps" with:
VAR SelectedProject = SELECTEDVALUE('Projects'[tr_nickname])

But again, this won’t work inside a calculated table. You’ll need to move the logic into a measure and use it in a visual like a matrix or line chart.

Option 2: Use a Paginated Report or Calculation Group

If you absolutely need a dynamic table output, consider using a paginated report or a calculation group to simulate dynamic table behavior.

Here’s a Microsoft doc that explains why calculated tables don’t respond to slicers:\ Microsoft Learn

Let me know if you want help converting your logic into a measure-based visual.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

Translation and formatting supported by AI

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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