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
Sharu
Frequent Visitor

Measure not filtering as expected

Dear all,

 

I need to calculate the amount of repeated incidents per category and the incidents need to have a standard solution. I used the following formula to calculate it (I have blanked out the table names):

2.png
 
See the picture below for the visual. Sidenote: I have added a visual filter KPI04.1 occurence > 1, because then the visual will only show the actual amount of incidents which have happened more than once.
Untitled.png
 
When I did some testing, I came to the conclusion that my filter only worked partly. It does filter out some of the reocurring incidents which don't have standard solution, but somehow not all of them. Only when I add another visual filter (standard solution = yes), it shows my desired outcome. Does anyone know what is wrong with my formula? And is this the right/best way to calculate how many repeated incidents there are? I don't have much experience with DAX, so any help would be helpful!
 
Thanks in advance!
 
Sharu
1 ACCEPTED SOLUTION

Thanks for your help! I altered your measure a little bit, and it works!

 

This is the measure I ended up using:

 

KPI = CALCULATE(( COUNT(Table[Brief Description (Details)])), FILTER(Table,[Standard solution] = "Yes" ) )

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@Sharu ,

 

This issue may caused by one filter is affected by other filters in other visuals. To be general, you may modify measure like pattern below and check if the issue persists.

KPI =
COUNTROWS (
    FILTER (
        ALL ( Table ),
        [Brief Description (Details)] = EARLIER ( [Brief Description (Details)] )
            && [Standard solution] = "Yes"
    )
)

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.

@v-yuta-msft 

 

Thanks for your reply! I created a new blank Power BI file and created this visual again while using your measure, but unfortunately I got the same result as before. Is there any other way to calculate the amount of repeating values?

 

Sharu

@Sharu ,

 

How about measure below?

KPI =
CALCULATE (
COUNT ( Table[Brief Description (Details)] ),
FILTER (
ALLEXCEPT ( Table, Table[Brief Description (Details)] ),
Table[Standard solution] = "Yes"
)
)

 

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.

Thanks for your help! I altered your measure a little bit, and it works!

 

This is the measure I ended up using:

 

KPI = CALCULATE(( COUNT(Table[Brief Description (Details)])), FILTER(Table,[Standard solution] = "Yes" ) )

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.