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

Chiclet slicer selections - measure to test

Hi all,

 

I am using the Chiclet slicer with two possible options (A, B) but using the Multiple Selection setting = ON and the Forced Selection setting = OFF.

 

I want to show the items that match on another table on the page.

 

This gives me four possibilities with the following required outputs 

 

A on, B on - show all values 

A on, B off - show just values where ColumnName = A

A off, B on - show just values where ColumnName = B

A off, B off - show nothing

 

Using IF( HASONEFILTER( ColumnName), COUNTROWS(etc etc), BLANK() ) enables me to achieve the last 3, but the first one  (A on, B on) gives me no values. Same if I use HASONEVALUE().

 

If I have no wrapper function (i.e. just have COUNTROWS(etc etc) as the measure), then the first 3 work, but the last one (A off, B off) shows all the values.

 

Thanks in advance. 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try this formula:

Sales measure =
IF (
    ISFILTERED ( 'TableName'[ColumnName] ),
    COUNTROWS ( 'TableName'),
    BLANK ()
)

Best regards,
Yuliana Gu

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

View solution in original post

1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Please try this formula:

Sales measure =
IF (
    ISFILTERED ( 'TableName'[ColumnName] ),
    COUNTROWS ( 'TableName'),
    BLANK ()
)

Best regards,
Yuliana Gu

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

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.