Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.