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
Matthew_Theis
Advocate II
Advocate II

Distinct Count using an indirect filter

Hello Everyone,  

 

I'm building a gauge chart to show the percent of quotes that a quoter submits before 24 hours passes.  I am able to calculate this metric, but I'm having trouble producing the target value.  
Gauge1.PNGFrom the tables below, you can see that the calculation is working, and there is a relationship between VP Area and the Quoter.

 

What I want to see happen, is that when a Quoter is selected from a Report Filter, I expect to see the Quoter Percentile as the Value, and the VP Area Percentile as the target.  

 

Example: Camilo Perez is selected.  Value 61.6.  Target 64.0.

 

What's happening is the VP Area Percenile filters along with the selected Quoter.

 

Does it matter that VP area comes from a different table?

 

Speedometer Percentile Quotes < 24 Hours =
VAR TotalQuotes =
CALCULATE(
DISTINCTCOUNT(QuotesHeader[Id])
)
Return

DIVIDE(
CALCULATE(
DISTINCTCOUNT(QuotesHeader[Id]),
FILTER(QuotesHeader,QuotesHeader[Submitted_Duration]<86400000)
),
TotalQuotes,0
)*100
***********************************************************************************************************
Speedometer VP Area Percentile Quotes < 24 Hours =
VAR TotalQuotes =
CALCULATE(
DISTINCTCOUNT(QuotesHeader[Id])
)
Return

(CALCULATE(
DISTINCTCOUNT(QuotesHeader[Id]),
FILTER(QuotesHeader,QuotesHeader[Submitted_Duration]<86400000),
ALL(QuotesHeader[Assignee Clean])
)/TotalQuotes)*100
2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Matthew_Theis,

 

You may try the measure below.

Speedometer VP Area Percentile Quotes < 24 Hours =
VAR TotalQuotes =
    CALCULATE (
        DISTINCTCOUNT ( QuotesHeader[Id] ),
        ALL ( QuotesHeader[Assignee Clean] )
    )
RETURN
    DIVIDE (
        CALCULATE (
            DISTINCTCOUNT ( QuotesHeader[Id] ),
            QuotesHeader[Submitted_Duration] < 86400000,
            ALL ( QuotesHeader[Assignee Clean] )
        ),
        TotalQuotes
    )
        * 100
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft,

 

I tried the mentioned calculation, which appears to be correct on the surface.  When I filter on an Assignee Clean, your calculation filters.  What I expect to see is 64.0 for the Americas, but when I filter on Camilo Perez, the calculation seems to use only the records associated with Camilo, thus returning a score of 61.4.

 

Thanks!

 

Matthew

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.