Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Filtering issue using dis connect table

Hi Expert

 

I am trying to filter the table as shown, once you open up the attached pBIX file. if the user selects upward trend the filter the table to show upward facing arrows only and like wise if downward trend is select then downward facing arrow and the No Trend is No Trend is nothing is select from the slicer the default.

 

https://www.dropbox.com/s/w4p1z5ueibwrwxd/Sample__Test.%281%29.pbix?dl=0

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

You could try something like this:

First create a new table/dimension called dimTrend like this
Trend_id  Trend

1              Up

2              Down

3              No trend

dimTrend should not have any connections to any other tables.

Create a measure like this

trendFilter =
IF (
    HASONEVALUE ( dimTrends[Trend] );
    IF ( SELECTEDVALUE ( dimTrends[Trend] ) = [__trend]; 1; 0 );
    1
)

and add the dimTrend[Trend]-column to a slicer. Add the [trendFilter]-measure to the visual you want to filter, and set to filter on [trendFilter]=1.

The measure will return 1 if more than 1 value is selected in the slicer. If only 1 value is selected, only the trends which corresponds with the trend selected, will get the value 1.

View solution in original post

2 REPLIES 2
sturlaws
Resident Rockstar
Resident Rockstar

You could try something like this:

First create a new table/dimension called dimTrend like this
Trend_id  Trend

1              Up

2              Down

3              No trend

dimTrend should not have any connections to any other tables.

Create a measure like this

trendFilter =
IF (
    HASONEVALUE ( dimTrends[Trend] );
    IF ( SELECTEDVALUE ( dimTrends[Trend] ) = [__trend]; 1; 0 );
    1
)

and add the dimTrend[Trend]-column to a slicer. Add the [trendFilter]-measure to the visual you want to filter, and set to filter on [trendFilter]=1.

The measure will return 1 if more than 1 value is selected in the slicer. If only 1 value is selected, only the trends which corresponds with the trend selected, will get the value 1.

Anonymous
Not applicable

sturlaws.

 

many thanks much appreciated for the excellent feedback.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.