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

Slicer to Filter Data Specific Data

Hi,

 

I want to create slicer with value C1,C7,C28.When user select C28,then C1,C7 C28 should be filter and when user select C7 then C7 ,C1 should be filtered from below dataset.

 

PFB Below dataset for refernce 

 

 

DateUsersMetric
2/5/2018AC1
2/6/2018BC1
2/7/2018CC7
2/7/2018CC28
2/8/2018DC7
2/8/2018DC28

 

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Slicer to Filter Data Specific Data

Hi @atul9063,

 

I'm not so sure for your description, can you please explain more about your requirement? Such as some expected result.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper III
Helper III

Re: Slicer to Filter Data Specific Data

@v-shex-msftWhen User select C28,then all rows in below dataset less than equal to C28(i.e C28,C7 and C1 ) should be filtered and when user select C7 then all rows less and equal to C7(i.e C7 and C1) should be filtered. 

image.png

Highlighted
Helper III
Helper III

Re: Slicer to Filter Data Specific Data

@v-shex-msft Could you please look into this problem

Highlighted
Community Support
Community Support

Re: Slicer to Filter Data Specific Data

Hi @atul9063,

 

Please refer to below steps to achieve your requirement.

 

Steps:

1. Create a new table with all metric types and use new table column as source of slicer.

Selector = VALUES(Table1[Metric])

2. Write a measure to compare selected metric and current row contents.

filter check = 
VAR selected =
    ALLSELECTED ( Selector[Metric] )
VAR _filter =
    MAXX (
        SUMMARIZE (
            FILTER ( ALLSELECTED ( Table1 ), [Metric] IN selected ),
            [Metric],
            "MinDate", MIN ( Table1[Date] )
        ),
        [MinDate]
    )
RETURN
    IF ( SELECTEDVALUE ( Table1[Date] ) <= _filter, "Y", "N" )

Use raw data to create a table visual, drag above measure to visual level filter to filter 'N' result records.

64.gif

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper III
Helper III

Re: Slicer to Filter Data Specific Data

@v-shex-msft  Actually below is dataset

 

Selecting churn7 on slicer would filter the below table for Churn='Churn7' or Churn='Churn1'

similarly on selecting churn28, filter would be Churn='Churn1' or Churn='Churn7' or Churn='Churn28' so output would be

 

TPIDChurn

1Churn1
2Churn7
3Churn1
4Churn28
5Churn7
6No Churn

 

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

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!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors