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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Count Indicator Achievement [DistinctCount, Summarize, Countrows]

Hi there, 

Newbie is here. I have been stuck for 1 month to fix my dashboard. Hope someone can help me.

I have a raw data like this:

IndicatorNameMonthTargetActual
Indicator101/01/202105
Indicator201/01/202151
Indicator301/01/20213020
Indicator401/01/202120
Indicator501/01/202100
Indicator101/02/202150
Indicator201/02/202121
Indicator301/02/202108
Indicator401/02/202100
Indicator501/02/202100
Indicator101/03/202127
Indicator201/03/202102
Indicator301/03/20211017
Indicator401/03/202184
Indicator501/03/202100

And I've managed to get this kind of table which is as expected - with slicer month active

IndicatorTargetActualAchievement
Indicator1[Sum(Target)][Sum(Actual)]divide (Sum(Actual), Sum(Target))
Indicator2"""
Indicator3"""
Indicator4"""
Indicator5"""

 

But when I want to use a Card that visualizes the "number of indicators that reach the target by at least 90%", I don't get what I expect. I thougt it was because I should use the summarize function. But when I use summarize function, month slicer didn't work.

 

What I am expecting is, when I Click the Month slicer for 'month 01' and 'month 02', the Card should showing: 

JuliusSugi_1-1661825020723.pngJuliusSugi_2-1661825029446.pngJuliusSugi_3-1661825036235.png

 

I have managed for VAR Indicator with Target:

Indicator with Target = CALCULATE(DISTINCTCOUNT(Query1[Indicator]),FILTER(Query1,Query1[Target]>0))
 
But for the Indicator Achieved Target, I still stuck to produce this variable.
SUM Achievement Indicator = Query1[SUM Actual]/Query1[SumTarget]
Indicator Achieved Target = CALCULATE(DISTINCTCOUNT(Query1[Indicator]),FILTER(query1,Query1[SUM Achievement Indicator]>0.89)) --> the result is not as expected.
 
Really appreciate your support on this.
Thank you in advance.
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

All measures are in the attached pbix file.

 

Picture1.png


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Jihwan_Kim . I have managed the rest. Just to add conditional in countrows part and it works. 

 

Indicator Achieved NEW = COUNTROWS ( FILTER ( Indicator, [Achievement measure] >= 0.9 && [SUM Target NEW]<>0) )

 

You've saved my day! Thank you

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

All measures are in the attached pbix file.

 

Picture1.png


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi @Jihwan_Kim 

Thanks a lot for your effort. I just clone your DAX to my dataset. Unfortunately, for the 'Indicator Achieved' VAR, it's still counting non targeted indicator if it has 'Actual' value. This is not what I expecting before.

JuliusSugi_0-1661838552588.png

from above, this supposed to be '7' Indicator Achieved not 9.

 

Is it because of [HASONEVALUE 'Achievement Measure'] ? Is there any way to adjust from this:

Achievement measure: =
IF (
    HASONEVALUE ( Indicator[IndicatorName] ),
    IF (
        [Target measure:] = 0
            && [Actual measure:] <> 0,
        1,
        DIVIDE ( [Actual measure:], [Target measure:] )
    )
)
 
Thanks again for your helpful hands.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.