cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Create dynamic DAX table filtered by slicer from another table

Good Day everyone,

 

Requesting some help with this issue after searching for over few hour. I have a table with surver responses for events called SurveyList. it has 2 columns Question and Answer. One question is "What event you attended". The table has other questions related to events.

 

My requirement is to create a new dynamic table with a column that will store unique (Distinct) values from column Answer where the question is "What event you attended". Effectively, I want to use the new table column as a slicer to filter specific event's feedback/report. 

 

I checked and to the best of my understanding unfortunately a slicer does not support visual filter.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Create dynamic DAX table filtered by slicer from another table

Hi @yatinpurohit,

 

Check this:

 

First create a new calculated column to calculate the number of Answers for each Question to find out the Distinct values. Something like:

 

Answer Number =
CALCULATE (
    COUNT ( SurveyList[Answer] ),
    ALLEXCEPT ( SurveyList, SurveyList[Question ], SurveyList[Answer] )
)

 

Then create a new calculated table:

 

New Survery Table =
FILTER (
    SurveyList,
    SurveyList[Question ] = "What event you attended"
        && SurveyList[Answer Number] = 1
)

7.PNG

 

If above method doesn't satisfy your requirement. Please share us more detailed information like some sample data and its corresponding expected result. So that we can know your actual situation and provide more accurate suggestions.

 

Thanks,
Xi Jin.

View solution in original post

3 REPLIES 3
Highlighted

Re: Create dynamic DAX table filtered by slicer from another table

You cannot create a dynamic table based on a slicer. I suggest you read this article. https://www.daxpatterns.com/survey/



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Highlighted
Helper I
Helper I

Re: Create dynamic DAX table filtered by slicer from another table

Sorry, may be I was not clear. I am not trying to create a table from slicer. I m trying to create a table from another table's column with a condition .

Highlighted
Solution Sage
Solution Sage

Re: Create dynamic DAX table filtered by slicer from another table

Hi @yatinpurohit,

 

Check this:

 

First create a new calculated column to calculate the number of Answers for each Question to find out the Distinct values. Something like:

 

Answer Number =
CALCULATE (
    COUNT ( SurveyList[Answer] ),
    ALLEXCEPT ( SurveyList, SurveyList[Question ], SurveyList[Answer] )
)

 

Then create a new calculated table:

 

New Survery Table =
FILTER (
    SurveyList,
    SurveyList[Question ] = "What event you attended"
        && SurveyList[Answer Number] = 1
)

7.PNG

 

If above method doesn't satisfy your requirement. Please share us more detailed information like some sample data and its corresponding expected result. So that we can know your actual situation and provide more accurate suggestions.

 

Thanks,
Xi Jin.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors