cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aby17 Frequent Visitor
Frequent Visitor

Advanced Filter to always show one value irrespective of the filter selection

Hi, 

 

I have 2 field which is as below;

Type Value
HP1
HP2
HP3
HP4
HP5
HP6
HP7
HP8
HP9
HP10
AC0
AC0
AC0
AC0
AC0
AC0
AC0

 

I have a slicer for this and I want to always show AC (and its value which is zero always) iresspective of the slicer selection

 

Example: If I select slicer from 5 to 10, I want to show all HP values from 5 to 10 plus all AC rows as well

 

Is there a  DAX code for this or any advance Filter options? Thanks !

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Advanced Filter to always show one value irrespective of the filter selection

Hi @Aby17,

You can take a look at the following steps if they suitable for your requirement.

1, Add an Index Column to show all AC rows at query editor side.

2, Create a calculated table: 

Slicer store = DISTINCT('Type-Value'[Value])

3, Add new measure:

Measure 2 =
IF (
    SELECTEDVALUE ( 'Type-Value'[Type] ) = "AC",
    SUM ( 'Type-Value'[Index] ),
    IF (
        SUM ( 'Type-Value'[Value] ) IN FILTERS ( 'Slicer store'[Value] ),
        SUM ( 'Type-Value'[Index] ),
        BLANK ()
    )
)

1.png

If above doesn't work, share some sample data and expected output will be help.

Best Regards,

Jack

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



For learning resources/Release notes, please visit: | |

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Advanced Filter to always show one value irrespective of the filter selection

Hi @Aby17,

You can take a look at the following steps if they suitable for your requirement.

1, Add an Index Column to show all AC rows at query editor side.

2, Create a calculated table: 

Slicer store = DISTINCT('Type-Value'[Value])

3, Add new measure:

Measure 2 =
IF (
    SELECTEDVALUE ( 'Type-Value'[Type] ) = "AC",
    SUM ( 'Type-Value'[Index] ),
    IF (
        SUM ( 'Type-Value'[Value] ) IN FILTERS ( 'Slicer store'[Value] ),
        SUM ( 'Type-Value'[Index] ),
        BLANK ()
    )
)

1.png

If above doesn't work, share some sample data and expected output will be help.

Best Regards,

Jack

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



For learning resources/Release notes, please visit: | |

View solution in original post

Helpful resources

Announcements
Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 153 members 1,721 guests
Please welcome our newest community members: