How can I use a disconnected table to drive multiple visual interactions

0 votes

How can I use a disconnected table to drive multiple visual interactions?
I need to leverage a disconnected table in Power BI to drive interactions across multiple visuals. How can I use a disconnected table (such as a parameter table) to control filter selections or slicer options across various visuals, ensuring that the interaction logic remains flexible and scalable without affecting the data model?

1 day ago in Power BI by Evanjalin
• 24,110 points
28 views

1 answer to this question.

0 votes

Using a disconnected table in Power BI provides flexibility and dynamic interaction between numerous visuals without having to modify any part of the underlying data model or affecting the relationships among the different tables. A disconnected table, commonly referred to as a parameter or slicer table, is not related to any other table in the model. Still, it enables a DAX-related interaction.

Use it as a disconnected table to control the filter selections or slicer options over various visuals, as follows:

1. Create a Disconnected Table.

First, create a disconnected table.

One of the most frequent uses of a disconnected table is to create a parameter table for controlling slicers or filters. Still, it is not connected to any other tables in the data model.

DAX Example of a parameter table:

ParameterTable = 
DATATABLE("Parameter", STRING, {{"Option 1"}, {"Option 2"}, {"Option 3"}})

The simple columns in this table may have a few options. Other than that, it has no association with any other tables in the model.

2. Utilize the Disconnected Table in the Slicer

Add the Parameter column from the disconnected table to the Slicer visual.

This Slicer allows the user to select one of the different options in the disconnected table.

3. Use DAX to Control Interactions Based on the Slicer Selection Directly

Now, you can create DAX measures responding to that slicer selection and thus controlling dynamically displayed values in other visuals.

Example: Dynamic measures based on a slicer selection. Say you wanted to show sales data according to the selected option from the disconnected table. You would use SELECTEDVALUE to extract the slicer value and proceed with the calculations accordingly.

Dynamic Sales Measure = 
SWITCH(
    SELECTEDVALUE('ParameterTable'[Parameter]),
    "Option 1", CALCULATE(SUM('Sales'[SalesAmount]), 'Sales'[Region] = "North"),
    "Option 2", CALCULATE(SUM('Sales'[SalesAmount]), 'Sales'[Region] = "South"),
    "Option 3", CALCULATE(SUM('Sales'[SalesAmount]), 'Sales'[Region] = "East"),
    SUM('Sales'[SalesAmount])  -- Default case if no option is selected
)

In this example:

  • SELECTEDVALUE('ParameterTable'[Parameter]): This retrieves the selected option from the disconnected table.

  • SWITCH: Based on the selected option, it adjusts the calculation of the SUM('Sales'[SalesAmount]) with filters applied based on the option chosen (e.g., region-specific sales).

4. Apply the Measure Across Multiple Visuals

Now that you have a dynamic measure, you can use it in multiple visuals (e.g., bar charts, line charts, tables) to show the relevant data based on the slicer selection. The slicer from the disconnected table drives the filtering logic, but it does not directly affect any relationships in the data model.

Example:

  • Place the Dynamic Sales Measure in a bar chart to display sales by region.

  • Add the ParameterTable slicer to filter the chart dynamically based on the selected option.

  • You can use the same measure in multiple visuals (tables, KPI cards, etc.) to create consistent interaction across the report.

5. Ensure Flexibility and Scalability

To ensure that the interaction logic remains flexible and scalable:

  • You can extend the disconnected table by adding more options and logic to the DAX measure. For instance, if you want to add more regions, time periods, or categories, simply update the ParameterTable and modify the DAX logic accordingly.

  • You can create more complex measures using similar logic and keep them scalable by using DAX functions like SWITCH, IF, or FILTER to respond to different slicer selections.

Example: Multiple Disconnected Tables Driving Interactions

You can use multiple disconnected tables to control different aspects of a report. For example, one slicer could control regions, while another could control time periods (e.g., months or quarters).

  1. Region Selection:

RegionTable = DATATABLE("Region", STRING, {{"North"}, {"South"}, {"East"}, {"West"}})

2. Time Period Selection:

TimePeriodTable = DATATABLE("Period", STRING, {{"Last 3 Months"}, {"Last 6 Months"}, {"YTD"}, {"Last Year"}})

3. Dynamic Measure Based on Both Slicers:

Sales Measure = 
SWITCH(
    TRUE(),
    SELECTEDVALUE('RegionTable'[Region]) = "North" && SELECTEDVALUE('TimePeriodTable'[Period]) = "Last 3 Months", 
        CALCULATE(SUM('Sales'[SalesAmount]), 'Sales'[Region] = "North", 'Sales'[Date] >= DATEADD(TODAY(), -3, MONTH)),
    SELECTEDVALUE('RegionTable'[Region]) = "South" && SELECTEDVALUE('TimePeriodTable'[Period]) = "Last 6 Months", 
        CALCULATE(SUM('Sales'[SalesAmount]), 'Sales'[Region] = "South", 'Sales'[Date] >= DATEADD(TODAY(), -6, MONTH)),
    SUM('Sales'[SalesAmount])  -- Default case
)

Advantages of Using Stand-Alone Tables:

No Influence on Data Model: The stand-alone table is not connected to another table, so this won't affect your relationships or create unwanted changes in the model.

Flexible Interaction: Independent tables provide the capability of controlling how a report may react without having to redesign your data model.

Scalable: You can easily add coordination in the disconnected table and DAX straight away to support more slicers or parameters for complex interactions.

answered 1 day ago by Evanjalin
• 24,110 points

Related Questions In Power BI

0 votes
1 answer

How can I retrieve a mapped value from a many-to-one related table in Power BI when using DirectQuery mode?

Get the associated values per multiple linked ...READ MORE

answered Jan 23 in Power BI by pooja
• 21,850 points
81 views
0 votes
1 answer

How can I fix a Power BI visual that keeps showing "See details" or other errors when rendering?

The "See details" error typically arises from ...READ MORE

answered Dec 30, 2024 in Power BI by Anu
• 3,020 points

edited Mar 6 212 views
+1 vote
2 answers
+1 vote
1 answer

How can you use Power Pivot in Excel to create a star schema model and integrate it with Power BI for reporting?

How Power Pivot gives optimal data models: ...READ MORE

answered Dec 2, 2024 in Power BI by pooja
• 21,850 points
158 views
+2 votes
0 answers

Assume referential integrity

1) What is Assume referential integrity? what ...READ MORE

Aug 19, 2019 in Power BI by vnk
1,955 views
+2 votes
1 answer

If Condition

DAX - I assume [Claim_line].[Allowed_Amount_B6] is one ...READ MORE

answered Aug 20, 2019 in Power BI by anonymous
• 33,050 points
1,764 views
+2 votes
1 answer

How to export data to CSV from power bi embedded url ?

Hi Arathi, You can open Visuals from embedded ...READ MORE

answered Aug 23, 2019 in Power BI by anonymous
• 33,050 points
6,815 views
+1 vote
1 answer

Power Bi to Machine Learning Model

Hello @vnk! Power BI only supports Azure Machine ...READ MORE

answered Dec 3, 2019 in Power BI by Priyanka
1,342 views
0 votes
1 answer

How do I add dynamic conditional formatting to a matrix table based on multiple conditions?

To apply dynamic conditional formatting in a ...READ MORE

answered Mar 18 in Power BI by anonymous
• 24,110 points
58 views
0 votes
1 answer

How can I use DAX to generate a dynamic ranking that changes based on selected filters?

You can create a dynamic ranking measure ...READ MORE

answered Mar 25 in Power BI by anonymous
• 24,110 points
58 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP