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

Create Dynamic Table from Slicer

Hello All!

I'm trying to output a list of names from a dynamic slicer. 

 

I've attached Sample PBIX  file with 2 simple tables: "students" & "grades" joined by an [id] field.
I've created a slicer from a disconnected table and made a measure with a SWITCH statement to dynamically select which measure to run.  Works perfectly and CARD visual shows the dynamic results of my "_Total Students" using COUNTROWS.

The challenge is I want a table visual to dynamically display ONLY the "name" and "age" of the students selected by the slicer.  

 

Screenshot_4.jpg

 

 

Thanks for your help!

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of ways to create solution is, in my opinion, to create a measure like below instead of putting in the [age] column itself to the visualization.

 

 Picture1.png

 

Age measure: = 
IF (
    HASONEVALUE ( students[name] ),
    MAXX (
        FILTER ( grades, [_Total Students] <> BLANK () ),
        RELATED ( students[age] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
bmurf
Frequent Visitor

Awesome!  Thanks!
One more question. I actually only wanted the [name] not the [age] so i modifed the new measure

show names = 
IF (
    HASONEVALUE ( students[name] ),
    MAXX (
        FILTER ( grades, [_Total Students] <> BLANK () ),
        RELATED ( students[name] )
    )
)



  my solution was to make the table visual with:
- 1 column 'students[name] &
- a filter on the visual: [show names] is not blank. 

That works fine, but is there a way to have the only column in  the table visual be the [show names] measure? 
MAXX only shows 1 name and I couldn't quite get the code right using VALUES.  

Hi,

Thank you for your feedback.

Please check the below picture and the attached pbix file.

One of ways to achieve this is using "Filters on this visual" feature in Filters section.

 

- Select a visualization that shows all names.

- Go to Filters section and drag the measure (Age measure:) into the Fiters on this visual area.

- select "is not blank" from the dropdown.

- click Apply filter.

 

Picture1.png


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of ways to create solution is, in my opinion, to create a measure like below instead of putting in the [age] column itself to the visualization.

 

 Picture1.png

 

Age measure: = 
IF (
    HASONEVALUE ( students[name] ),
    MAXX (
        FILTER ( grades, [_Total Students] <> BLANK () ),
        RELATED ( students[age] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.