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 September 15. Request your voucher.

Reply
naa217
Regular Visitor

Linking an aggregated table to main data table

I have created an aggregated table in Power BI to summarize how clients have responded to a measure. Specifically, I want to know how many clients have rated items in each category as "None", "Mild", "Moderate", or "Severe". To achieve this, I created measures in my main data source that count the number of times each rating has been selected for each category. I then created a new table to summarize these measures. The DAX code for this summary table is as follows:

CVSummary =
UNION(
    SELECTCOLUMNS(
        { ("Problem Descriptor") },
        "Category", "Problem Descriptor",
        "None", CALCULATE([problemdescriptor_none]),
        "Mild", CALCULATE([problemdescriptor_mild]),
        "Moderate", CALCULATE([problemdescriptor_moderate]),
        "Severe", CALCULATE([problemdescriptor_severe])
    ),
    SELECTCOLUMNS(
        { ("Educational Difficulties") },
        "Category", "Educational Difficulties",
        "None", CALCULATE([Educational_difficulties_none]),
        "Mild", CALCULATE([Educational_difficulties_mild]),
        "Moderate", CALCULATE([Educational_difficulties_moderate]),
        "Severe", CALCULATE([Educational_difficulties_severe])
    ),
    SELECTCOLUMNS(
        { ("Contextual Factors") },
        "Category", "Contextual Factors",
        "None", CALCULATE([contextualfactors_none]),
        "Mild", CALCULATE([contextualfactors_mild]),
        "Moderate", CALCULATE([contextualfactors_moderate]),
        "Severe", CALCULATE([contextualfactors_severe])
    )
)

I then used this aggregated table to create a stacked bar chart that visualizes the distribution of responses across the categories. However, the problem I am facing is that this visual does not interact with other visuals or filters in my report. For example, if I apply a filter to show data for males only, the values in this visual do not update—they remain static.

 

My Question: Does anyone know how I can ensure that this visual interacts dynamically with other visuals and filters on the report page? I need the values to update based on the filters applied, such as when filtering for specific demographics like gender.

3 ACCEPTED SOLUTIONS
Sahir_Maharaj
Super User
Super User

Hello @naa217,

 

One solution is to rewrite the CVSummary table using the SUMMARIZE function:

CVSummary =
SUMMARIZE(
    MainDataTable,  
    MainDataTable[Category], 
    "None", CALCULATE([problemdescriptor_none]),
    "Mild", CALCULATE([problemdescriptor_mild]),
    "Moderate", CALCULATE([problemdescriptor_moderate]),
    "Severe", CALCULATE([problemdescriptor_severe])
)

Hope this helps!


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

dharmendars007
Super User
Super User

Hello @naa217 , 

Thank you for your Question..

Any physical table that is created will not be having any relationship with your main table therefore you cannot apply any filter that can sync to main table..

I would suggest you to create Calculated columns inside the main table with the "If" or "Switch" Condition..I have given a example below which might help you..

Measure  = If([Category] = "Contextual Factors", "None" )
Switch Function Power BI 

 

Hope this helps..if you find this soultion/suggest helps please mark it as solution and give a Like 👍..

Thanks

Dharmendar S 
LinkedIN Profile 

View solution in original post

sjoerdvn
Super User
Super User

Creating aggregated calculated tables in Power BI hardly ever makes sense. As any calculated table is loaded at the model refresh, the content is not affected by any slicer or filter.
Just let the measures do the aggregations: it is what Power BI was created for to do.
If you do expierence performance issues, you can consider using automatic aggregations.

View solution in original post

3 REPLIES 3
sjoerdvn
Super User
Super User

Creating aggregated calculated tables in Power BI hardly ever makes sense. As any calculated table is loaded at the model refresh, the content is not affected by any slicer or filter.
Just let the measures do the aggregations: it is what Power BI was created for to do.
If you do expierence performance issues, you can consider using automatic aggregations.

dharmendars007
Super User
Super User

Hello @naa217 , 

Thank you for your Question..

Any physical table that is created will not be having any relationship with your main table therefore you cannot apply any filter that can sync to main table..

I would suggest you to create Calculated columns inside the main table with the "If" or "Switch" Condition..I have given a example below which might help you..

Measure  = If([Category] = "Contextual Factors", "None" )
Switch Function Power BI 

 

Hope this helps..if you find this soultion/suggest helps please mark it as solution and give a Like 👍..

Thanks

Dharmendar S 
LinkedIN Profile 

Sahir_Maharaj
Super User
Super User

Hello @naa217,

 

One solution is to rewrite the CVSummary table using the SUMMARIZE function:

CVSummary =
SUMMARIZE(
    MainDataTable,  
    MainDataTable[Category], 
    "None", CALCULATE([problemdescriptor_none]),
    "Mild", CALCULATE([problemdescriptor_mild]),
    "Moderate", CALCULATE([problemdescriptor_moderate]),
    "Severe", CALCULATE([problemdescriptor_severe])
)

Hope this helps!


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors