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

Measure with filter not propagating to table

Hi, 

 

I have made below measure which when used in a table should (in my world) show only filtered results.

 

MEASURE:

Number of succeeded executions = CALCULATE(COUNT(ExecutionLog3[ExecutionId]);
ExecutionLog3[Format] IN { "RPL"; "PBIX" };
ExecutionLog3[ItemAction] IN { "Render"; "ConceptualSchema" };
ExecutionLog3[Status] = "rsSuccess")
 

However, the table shows the entire dataset, regardless of the format, itemaction and status (the three filters).

Why is this happening? Why do not only results that fulfil the filter criteria display in the table?

 

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

Just adjust the formula by FILTER as below:

Number of succeeded executions =
CALCULATE (
    COUNT ( ExecutionLog3[ExecutionId] );
    FILTER (
        ExecutionLog3;
        ExecutionLog3[Format] IN { "RPL"; "PBIX" }
            && ExecutionLog3[ItemAction] IN { "Render"; "ConceptualSchema" }
            && ExecutionLog3[Status] = "rsSuccess"
    )
)

 

Regards,

Lin

Community Support Team _ Lin
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

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi  @Anonymous 

Just adjust the formula by FILTER as below:

Number of succeeded executions =
CALCULATE (
    COUNT ( ExecutionLog3[ExecutionId] );
    FILTER (
        ExecutionLog3;
        ExecutionLog3[Format] IN { "RPL"; "PBIX" }
            && ExecutionLog3[ItemAction] IN { "Render"; "ConceptualSchema" }
            && ExecutionLog3[Status] = "rsSuccess"
    )
)

 

Regards,

Lin

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

I appreciate your feedback guys, although my question still remains unanswered. 

Why does the measure filter my table and display only rows with "RPL" for instance, but when I add another condition, "PBIX", the table displays all types of formats. Not just PBIX and RPL.

Anonymous
Not applicable

Nevermind guys, when I use the dax supplied by you the table filters as expected. 

How come my dax does not filter my table, but yours does?

HotChilli
Super User
Super User

This is not how measure filters work.

The measure is evaluated for each row in your table visual.

 

If you want to filter the visual, use the Filter pane or slicers.

Anonymous
Not applicable

Thanks for the reply!

What confuses me however is when I only have one condition, like "RPL", the measure does filter the table to only display RPL rows. But when I have two conditions the entire dataset is still displayed in the table. 

Below works, but not measure in the first post.

 

CALCULATE(COUNT(ExecutionLog3[ExecutionId]);
FILTER(ExecutionLog3; ExecutionLog3[Format] = "RPL"
Anonymous
Not applicable

Hi @Anonymous 

 

Number of succeeded executions = CALCULATE(COUNT(ExecutionLog3[ExecutionId]),filter(ExecutionLog3,
ExecutionLog3[Format] IN { "RPL"; "PBIX" } &&
ExecutionLog3[ItemAction] IN { "Render"; "ConceptualSchema" } &&
ExecutionLog3[Status] = "rsSuccess")
 
THis will display count of id with the filters.
 
Incase you want to filter out rows.
measure=IF(
MAx(ExecutionLog3[Format]) IN { "RPL"; "PBIX" } &&
(ExecutionLog3[ItemAction]) IN { "Render"; "ConceptualSchema" } &&
(ExecutionLog3[Status]) = "rsSuccess",1,0)
 
add this measure to visual level filter and set it  to 1.
 
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.
 
 
 

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.