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
v_mark
Helper V
Helper V

Multiple filter conditions in calculate from two different tables

Hi, 

 

I need to know how many IDs are affected by this kind of filter. 

There are two tables involved in this process 

Which connected through Many To One relationship 

 

Initially, I create a measure 

Count Incidents = count(IncidentIDs) 

FinalMeasure=
CALCULATE (
[Count Incidents],
'Incident[IncidentType] = "Incident",
'Incident'[AssignedTeam] = "Helpdesk",
'Incident'[Status] = "Closed",
'Incident'[LinkedProblem] = BLANK (),
'Task'[ParentPublicID] = "Incident",
'Task'[OwnedByTeam] = "Helpdesk",
'Task'[Status] = "Closed",
'Task'[CloseCode] = "Completed"
)
 
Not sure if this is the right way to write this kind of calculate but ideally I want to know the proper way to write it.
Any Suggestion or Tips is highly appreciated 
 
Thank you in advance
4 REPLIES 4
Anonymous
Not applicable

Will the final measure will not work on this kind of model? 

Anonymous
Not applicable

@v_mark 

 

Your measure may work on the model you have. I'm trying to shield you from problems later down the line... But it's up to you if you choose to ignore or follow.

 

By the way, you have showed a measure but you have not told us what you really want your measure to do. So, you've got a measure that does something but nobody knows if this is what you want the measure to do... You might say: "Wait! But I've told you at the very beginning of my post!" Well, not really. Your measure does not obey filters that might already exist on the columns you've put in your measure. Is this what you want? Nobody knows... If you want the filters coming from outside to be honored, you have to wrap the relevant filters in your measure in KEEPFILTERS. For instance. But I'd suggest you should really start with reading the articles I've given you links to.

yes I want to honor those outside filters 

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