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
ansa_naz
Continued Contributor
Continued Contributor

Apply one slicer OR another to a table visual - is this possible?

I have a table visual showing customer transactions

I have two slicers - one to slice for all Outstanding transactions, one to slice for all transactions from the last year. I want to display transactions which are outstanding OR transactions from the last year. Is this possible?

 

Cheers

1 ACCEPTED SOLUTION

@ansa_naz ,

 

I'm afraid slicer can't achieve your requirement because the condition is always "and" between slicers. As a workaround, you can create a table using DAX below:

New Table = 
VAR Condition1 = FILTER('Table', 'Table'[Date] >= EDATE(TODAY(), -12))
VAR Condition2 = FILTER('Table', 'Table'[Outstanding] <> 0)
RETURN
DISTINCT(UNION(Condition1, Condition2))

Capture.PNG 

 

Community Support Team _ Jimmy Tao

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

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@ansa_naz ,

 


@ansa_naz wrote:

I have a table visual showing customer transactions

I have two slicers - one to slice for all Outstanding transactions, one to slice for all transactions from the last year. I want to display transactions which are outstanding OR transactions from the last year. Is this possible?

 

Cheers


Could you please share more details? For example, which columns are two slicers based on? In addtion, could you share some sample data and give the expected result?

 

Regards,

Jimmy Tao

ansa_naz
Continued Contributor
Continued Contributor

Hi @v-yuta-msft see below example tables:

 

Transactions:

ID          Amount           Date                   Outstanding

1            500                  01/01/2019        0

2            1000                01/01/2018        50

3            1500                01/01/2018        0

4             2000               01/01/2019        65

5            125                 31/12/2015         0

6            222                 15/06/2005         12

 

Datetable:

Date

01/01/2000

...

31/12/2030

 

Todays date = 26/06/2019

 

Relationships:

Datetable.Date    1--->M     Transactions.Date

 

Slicers are on fields Datetable.Date (Last 12 Months) and Transactions.Outstanding (<> 0)

 

I want to display the following in a table visual:

 

ID          Amount           Date                   Outstanding

1            500                  01/01/2019        0

2            1000                01/01/2018        50

4             2000               01/01/2019        65

6            222                 15/06/2005         12

 

Any ideas on how to accomplish this?

Cheers

@ansa_naz ,

 

I'm afraid slicer can't achieve your requirement because the condition is always "and" between slicers. As a workaround, you can create a table using DAX below:

New Table = 
VAR Condition1 = FILTER('Table', 'Table'[Date] >= EDATE(TODAY(), -12))
VAR Condition2 = FILTER('Table', 'Table'[Outstanding] <> 0)
RETURN
DISTINCT(UNION(Condition1, Condition2))

Capture.PNG 

 

Community Support Team _ Jimmy Tao

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.