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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
deniselias
Helper I
Helper I

Help with % by category

Hello,

I need to visualize the percentage of status for each document.

I have an measure but it's not showing all the status %

% Status = 
    DIVIDE(CALCULATE(DISTINCTCOUNT('Planilha1'[Documento_de_compras]), 'Planilha1'[Aderencia na Cadeia]="ADERENTE"),
        CALCULATE(DISTINCTCOUNT('Planilha1'[Documento_de_compras]))
    )

 

 

In the Pbix example I have 14 documents, 9 with status "ADERENTE", 3 with status "NÃO ADERENTE", 2 blank.
I need to see the correct % in the graphic excluding blankrow, so the correct for the Customer 7899 in August is:
75% "ADERENTE" and 25% "NÃO ADERENTE"

But my measure showing 100% "ADERENTE" and 300% "NÃO ADERENTE"
deniselias_1-1723866354971.png

 Pbix file:

https://1drv.ms/u/s!Avq1zGJizBimsUCECKbCmKD7UL7g?e=yZmBqc​

 

 

Thanks for all.

 

Regards,

Denis.

1 ACCEPTED SOLUTION

Hi,

Sorry I don't think I understand 100%. I cannot get the number, that you provided, by pbix file. 

I assume you are asking about the below?

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1723951114526.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

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I undeststood your question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1723869606256.png

 

 

% Status =
DIVIDE (
    CALCULATE (
        DISTINCTCOUNT ( 'Planilha1'[Documento_de_compras] ),
        'Planilha1'[Aderencia na Cadeia]
            = SELECTEDVALUE ( Planilha1[Aderencia na Cadeia] ),
        ALLSELECTED ( Planilha1 )
    ),
    CALCULATE (
        DISTINCTCOUNT ( 'Planilha1'[Documento_de_compras] ),
        ALLSELECTED ( Planilha1 )
    )
)

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.

Hi @Jihwan_Kim ,

 

Thanks for your help.

 

But unfortunately it was not what I expected. Trying to explain it better what I need is really the total percentage of the categories over the months.

 

In excel through pivot table I get what I need, a percentage of my 2 categories. I needed to reproduce in Power BI, but the DIVIDE measure with my parameters is not working well.

 

PBI:

deniselias_1-1723913624500.png

 


Excel:

deniselias_0-1723912771700.png

deniselias_0-1723915863118.png

 

 

I save the excel file example on same folder:
https://1drv.ms/u/s!Avq1zGJizBimsUCECKbCmKD7UL7g?e=yZmBqc​ 

Anonymous
Not applicable

Hi,@deniselias 

Can you tell me if your problem is solved? If yes, please accept Jihwan_Kim 'sreply as solution.

If you have already solved it yourself,share your solution and accept it as a solution that will help other community members who have the same problem as you.

 

Best Regards,

Leroy Lu

Hi,

Sorry I don't think I understand 100%. I cannot get the number, that you provided, by pbix file. 

I assume you are asking about the below?

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1723951114526.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.

Thanks @Jihwan_Kim for your help, I had a little adjust in the measure

 

Distinct: 

CALCULATE(
    DISTINCTCOUNT('STO'[Documento_de_compras])
)
 
Distinct 2:
CALCULATE(
    DISTINCTCOUNT('STO'[Documento_de_compras]), REMOVEFILTERS('STO'[Aderencia na Cadeia]), 'STO'[Aderencia na Cadeia]<>BLANK()
)
 
Thanks for all.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors