Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Anonymous
Not applicable

Filter by one column or another

Hi,

 

I am trying to add a page level filter to my report which is supposed to filter the page by one of two (or both) columns, Documents[StatusID] and Cases[CaseCompletionDate]. 

 

I want the filter to be something like,

filter page, where

(Documents[StatusID] = 6) OR (Cases[CasesCompletionDate] IS NOT NULL).

This works in SQL, but I can't find a DAX equivalent.

 

I want the page to show documents where either or both of these criterea have been fulfilled. Can this be done?

 

If this needs further clarification then I am happy to provide it. This is a link to my data

https://drive.google.com/open?id=1rHWNCVShe0KFpQddWJwajtbeBFNoT9-X

 

Thanks in advance!

4 REPLIES 4
mussaenda
Super User
Super User

Filter = IF(Documents[StatusID] = "6" || Cases[CasesCompletionDate] <> BLANK(), 1, 0)

Asuming that [StatusID] is in text format. then drag the column to page filter and check 1 only

Anonymous
Not applicable

https://drive.google.com/open?id=1rHWNCVShe0KFpQddWJwajtbeBFNoT9-X

 

Hi @mussaenda,


I have attached a link to a cut down version of my report. Currently, the 2 page level filters (Case Completion Date = is not blank & Posting Status ID = 6) are the 2 filters I want to be included in an OR filter.

 

I have made a calculated column, Documents[CompletedOrPostedFilterCol], which ideally would show 1 when either Case Completion Date = is not blank or when Posting Status ID = 6, but currently it shows 1 for every single value and I know that shouldn't be the case.

 

Thanks for your reply!

 

 

Hi @Anonymous,

 

Bear with me, I am not a BI expert.

 

Untitled.png

 

This is the output after filtering to ID=6 || Completion Date <> null.

The pbix link is here

Hi @Anonymous ,

Could you have tried with OR function for your report:

https://docs.microsoft.com/en-us/dax/or-function-dax

 

Regards,

Daniel He

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

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.