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
Highlighted
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
Highlighted
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
New Ranks and Rank Icons in 2020

New Ranks and Rank Icons in 2020

Read the announcement for more information!

New Kudos Given Badges Coming

New Kudos Given Badges Coming

We're rolling out new Kudos Given badges. Find out how many Kudos you've given.

November 2019 Community Highlights

November 2019 Community Highlights

Get an overview of the events and great community content from November.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)