Forum Discussion
Power BI dynamic visualizations
We have a predefined list of columns (e.g., Col1 to Col50) from which users can select multiple columns. The report includes 10 table visualizations, and each one should display data from one of the selected columns.
If the user selects more than 10 columns, only the first 10 selected columns should be used — each column should be mapped automatically to one of the 10 table visualizations.
Example:
If the user selects 15 columns out of the available 50, only the first 10 selected columns will be displayed across the 10 table visuals, with each table showing one selected column.
Approach followed : Used parameter slicer to select the column list where user can select multiple columns. Able to get the first 10 selected columns using the measure but unable to map columns dynamically to the tabular visualizations
Power BI cannot work with encrypted Excel files.
Confidential - Microsoft Extended:DESCRIPTION Data is classified and protected. Microsoft Full Time Employees (FTE) and non-employees can edit, reply, forward and print. Recipient can unprotect content with the right justification.
18 Replies
- pk3130Regular Visitor
Input1-MainTable :
col1 col2 col3 a a1 a2 a a1 b2 a b1 c2 b b1 d2 b c1 e2 b c1 d2
input2-UserselectedColumns :ColumnName col1 col2 Viz1 Viz2 Col1 Count Col2 Count a 3 a1 2 b 3 b1 2 c1 2 - HarishKMSuper User
pk3130 Hey,
I will follow below method as per your latest input.
1) Make sure you have a parameter table that lists all columns2) Use the UserselectedColumns[ColumnName] to create a slicer where users can select multiple columns.
3) Create measures for dynamic counting based on selected columns.Col1Count =
VAR SelectedCol1 = SELECTEDVALUE(UserselectedColumns[ColumnName], "col1")
RETURN
CALCULATE( COUNT(MainTable[ColumnName]), MainTable[True] = TRUE() )
4) Ensure each table visual dynamically interacts with the selected column measure.5) Use columns col1 and colcount1 for your first table visual.
follow by rest column
Thanks
Harish KMIf these steps help resolve your issue, your acknowledgment would be greatly appreciated.
- lbendlinSuper User
You might be better off using Small Multiples visuals, and Field Parameters for your columns to be used as the legend field.
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- pk3130Regular Visitor
We have a predefined list of columns (e.g., Col1 to Col50) from which users can select multiple columns. The report includes 10 table visualizations, and each one should display data from one of the selected columns.
If the user selects more than 10 columns, only the first 10 selected columns should be used — each mapped automatically to one of the 10 table visualizations.
Example:
If the user selects 15 columns out of the available 50, only the first 10 selected columns will be displayed across the 10 table visuals, with each table showing one selected column. - v-kpoloju-msftCommunity Support
Hi pk3130,
Thank you for reaching out to the Microsoft fabric community forum. I reproduced the scenario again, and it worked on my end. I used my sample data and successfully implemented it.
Outcome:
For other tables also you can follow same like this mentioned in the .pbix file. I am also including .pbix file for your better understanding, please have a look into it:
If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.
Thank you for using Microsoft Community Forum.- v-kpoloju-msftCommunity Support
Hi pk3130,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.Thank you!
- v-kpoloju-msftCommunity Support
Hi pk3130,
Hope you had a chance to try out the solution shared earlier. Let us know if anything needs further clarification or if there's an update from your side always here to help.Thank you.