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
veronicaxge
Frequent Visitor

Create new data table on the fly based on slicer selections

I have one massive table with several categorical columns (age group, education, location, affiliation, etc.) that serve as filters and two numerical columns with the values of interest such as test scores. 

Individual IDAge GroupEducationLocationAffliationTest SubjectTest Score 2018Test Score 2019
1age group 1bachelor'sBelgiumXXXSubject A  
1age group 1bachelor'sBelgiumXXXSubject B  
1age group 1bachelor'sBelgiumXXXSubject C  
2age group 3High schoolSingaporeYYYSubject A  
2age group 3High schoolSingaporeYYYSubject B  
2age group 3High schoolSingaporeYYYSubject C  
3age group 8master'sSouth AfricaZZZSubject A  
3age group 8master'sSouth AfricaZZZSubject B  
3age group 8master'sSouth AfricaZZZSubject C  
... (more records)       

 

The goal is to allow users to do one round of filtering with slicers on the categorical columns to query out all scores for one individual, and then a second round of filtering to query out those for a second individual.  And then, feed the queried information into a new table that looks like below. This is intended to be a table in the data model, not a visualization table on the canvas. 

 

Individual ID - First IndividualIndividual ID - Second IndividualTest SubjectTest Score 2018 - First IndividualTest Score 2019 - First IndividualTest Score 2018 - Second IndividualTest Score 2019 - Second Individual
13Subject A    
13Subject B    
13Subject C    

 

The requirement is that however the end users filter the data, this resulting table will draw the filtered results accordingly.

 

After long searching and video watching I still can't find how to effectively achieve this in Power BI. Any advice is appreciated! 

9 REPLIES 9
Anonymous
Not applicable

Hi @veronicaxge,

Please try to use matrix as below and check if it can satisfy your requirement:

matrix.JPG

Best Regards

Rena

Greg_Deckler
Community Champion
Community Champion

Just so we are clear, tables are calculated at the time of data load and are not dynamic. Thus, if you are expecting user interactivity then that user interactivity would have to come from setting measure values in a query if you want to end up with a "dynamic" table in the model. Is that OK?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

You need first and second individual both row and column ?

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak @Greg_Deckler @Anonymous  Thanks for your responses and clarifying questions!!

 

In the actual model I'd have thousands of individuals, each with scores from the three test subjetcs. I'd hope that users could use slicers to define two "subgroups" of individuals of certain age groups, education levels, and locations. For example subgroup 1 is all individuals who are in age group 1 with bachelor's degree in Belgium (which might not be only the Individual 1 in the example table; it could be any individual who has these characteristics); subgroup 2 is individuals in age group 8 with master's in South Africa. 

 

Would I be able to then feed these two groups into a new table with the structure I specified above? The plan is to then create four bars or four lines based on this new table to compare test scores 2018 and 2019 for the first group as well as scores 2018 and 2019 for the second group. 

Anonymous
Not applicable

Hi @veronicaxge ,

Could you please provide your final expected result? If the following is your expected result?

expected result.JPG

 

Best Regards

Rena

@Anonymous Hi Rena,

 

Thanks for your screenshot! How did you achieve the table in your screen shot? 

 

Two points for further clarification: 

- The table on your screenshot is definitely my expected result but I would hope the table to become a part of the data model, instead of a visual table on the canvas. Is that possble? 

- Another thing is that since the data model has thousands of people with different combinations of age, education, location,  I must be able to allow user to do the slicing on all three parameters for the two "subgroups", and accurately draw those two "subgroups" into the table structure in your screen shot. Is that achieveable with this table setting? 

Anonymous
Not applicable

Hi @veronicaxge,

The user can select the corresponding subgroup(combinations of age group, education and location) through the options of the three slicers, then view the individuals information about the corresponding subgroup. Here I share my example PBIX file with you, you can download it from this link. Please check whether that is what you want...

 

Best Regards

Rena

Hi Rena,

 

Thanks for your PBIX file! Very neat setup. 

 

What I'm trying to get at is whether it is possible to make that matrix table you created in the canvas as a part of the data model? I'm hoping to use that filtered table to create more visualization such as four bars or four lines on the same chart (e.g. ID1-2018 score, ID1-2019 score, ID3-2018 score. ID3-2019 score). In this current setup I am not able to create such charts.  

 

Thanks for your advice! 

Anonymous
Not applicable

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.