cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asaemart Regular Visitor
Regular Visitor

Exclude Filter

Hello,

 

We are trying to reproduce the following scenario with no sucess:

 

  • We have imported some data from SQLServer. Specifically one table with 5 columns ("Table1"), being one of them a flag (binary or bit, let's say it is called "flag0/flag1").
  • We have one visualization (table visualization) in which the information of Table1 is showed (except the "flag0/flag1" column).
  • We would like to have another visualization (slicer/check box filter) in which we use the "flag0/flag1" flag column:
    • There is just one box in the slicer ("let's say it is called "flag1") 
    • If the box is not selected, we would like to filter the Table1 for flag0. So as soon as we run the report, the filter is applied.
    • If the box is selected, we would like to filter the Table1 for flag1.

 

Thank you in advance and regards,

 

Adri.

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-huizhn-msft
Microsoft

Re: Exclude Filter

Hi @asaemart,

I try to reproduce your scenario by my sample table below.

1.PNG

I create a new table including flag1 by clicking "New Table" under Modeling on Home page.

2.PNG

Create two measures using the following formula.

ISSELECTED = IF(ISFILTERED(Table3[flag]), VALUES(Table3[flag]),BLANK())

Sales-new = IF(ISBLANK(Table3[ISSELECTED]),CALCULATE(SUM(Table2[sales]),FILTER(Table2,Table2[flag]="flag0")),CALCULATE(SUM(Table2[sales]),FILTER(Table2,Table2[flag]="flag1")))


Create a slicer including flag1, create a table visual shows the information, set the visual filter as the highlighted red line.

3.png

Please see the expected result. I shows the flag in table visual, so that you can see it directly. When we not select "flag1" it display all information for "flag0", otherwise, we select "flag0" it display all information for "flag1".

4.PNG5.PNG

Please download the attachments to test.

Thanks,
Angelia

 

View solution in original post

1 REPLY 1
Microsoft v-huizhn-msft
Microsoft

Re: Exclude Filter

Hi @asaemart,

I try to reproduce your scenario by my sample table below.

1.PNG

I create a new table including flag1 by clicking "New Table" under Modeling on Home page.

2.PNG

Create two measures using the following formula.

ISSELECTED = IF(ISFILTERED(Table3[flag]), VALUES(Table3[flag]),BLANK())

Sales-new = IF(ISBLANK(Table3[ISSELECTED]),CALCULATE(SUM(Table2[sales]),FILTER(Table2,Table2[flag]="flag0")),CALCULATE(SUM(Table2[sales]),FILTER(Table2,Table2[flag]="flag1")))


Create a slicer including flag1, create a table visual shows the information, set the visual filter as the highlighted red line.

3.png

Please see the expected result. I shows the flag in table visual, so that you can see it directly. When we not select "flag1" it display all information for "flag0", otherwise, we select "flag0" it display all information for "flag1".

4.PNG5.PNG

Please download the attachments to test.

Thanks,
Angelia

 

View solution in original post

Helpful resources

Announcements
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.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (2,969)