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

Adding a second Filter to a Calculate function

Hey guys,

I've got the following DAX formula:

Visits My Pension = CALCULATE(
DISTINCTCOUNT('OD - All Page Visits Portal'[VISIT_ID]),
FILTER('OD - All Page Visits Portal','OD - All Page Visits Portal'[PAGE_HOSTNAME]="my.pension.nl")
)

I'd like to add a second page to the filter: All Page Visits Portal'[PAGE_HOSTNAME]="my.pension.nl#"
So all the visit_id's of both pages are calculated. How can I add the second filter?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous ,

 

Visits My Pension = CALCULATE(
DISTINCTCOUNT('OD - All Page Visits Portal'[VISIT_ID]),
FILTER('OD - All Page Visits Portal','OD - All Page Visits Portal'[PAGE_HOSTNAME] in { "my.pension.nl", "my.pension.nl#" } ) )
)

View solution in original post

2 REPLIES 2
Aditya_Meshram
Solution Supplier
Solution Supplier

@Anonymous ,
can also do this 

Visits My Pension = CALCULATE(
DISTINCTCOUNT('OD - All Page Visits Portal'[VISIT_ID]),
FILTER('OD - All Page Visits Portal','OD - All Page Visits Portal'[PAGE_HOSTNAME]="my.pension.nl" || 'OD - All Page Visits Portal'[PAGE_HOSTNAME]="my.pension.nl#")
)
amitchandak
Super User
Super User

@Anonymous ,

 

Visits My Pension = CALCULATE(
DISTINCTCOUNT('OD - All Page Visits Portal'[VISIT_ID]),
FILTER('OD - All Page Visits Portal','OD - All Page Visits Portal'[PAGE_HOSTNAME] in { "my.pension.nl", "my.pension.nl#" } ) )
)

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.

Top Solution Authors