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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Percentage of the "bersih" and "Tak bersih"

Hi.

I need some help creating a measure to calculate the amount of "Bersih" answers in a column with "Bersih" and "Tak Bersih". I will use that result as a percentage in monthly bar chart. I want it to be the percentage of the various R&R  by "kebersihan meja" and "kebersihan lantai" so I can create the total score of Bersih like this.

 

Any ideas? I´m totally new to DAX. I´ve tried DIVIDE (COUNT([column name] = 'Bersih'; COUNT([column name])) and

% Bersih Meja =
DIVIDE (
CALCULATE ( COUNT ( Sheet1[Kebersihan Meja] ), Sheet1[Kebersihan Meja] = "Bersih" ),
CALCULATE ( COUNT ( Sheet1[Kebersihan Meja] ), ALLSELECTED ( Sheet1[Kebersihan Meja] ))).
 

Thank you in advance for you kind help and very very apreciate it.

 

iena_0-1639551611149.png

iena_0-1639555086244.png

 

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

According to your description, You can modify your measure.

Like this:

% Bersih Meja =
DIVIDE (
    CALCULATE (
        COUNT ( Sheet1[Kebersihan Meja] ),
        Sheet1[Kebersihan Meja] = "Bersih"
            && Sheet1[Kebersihan Lantai] = "Tak Bersih"
    ),
    CALCULATE (
        COUNT ( Sheet1[Kebersihan Meja] ),
        ALLSELECTED ( Sheet1[Kebersihan Meja] )
// COUNT ( Sheet1[Kebersihan Meja] )
    )
)

Not sure what your expected result looks like, please explain if it is not right.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

 

Best Regards,
Community Support Team _ Janey

View solution in original post

2 REPLIES 2
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

According to your description, You can modify your measure.

Like this:

% Bersih Meja =
DIVIDE (
    CALCULATE (
        COUNT ( Sheet1[Kebersihan Meja] ),
        Sheet1[Kebersihan Meja] = "Bersih"
            && Sheet1[Kebersihan Lantai] = "Tak Bersih"
    ),
    CALCULATE (
        COUNT ( Sheet1[Kebersihan Meja] ),
        ALLSELECTED ( Sheet1[Kebersihan Meja] )
// COUNT ( Sheet1[Kebersihan Meja] )
    )
)

Not sure what your expected result looks like, please explain if it is not right.

 

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.

 

Best Regards,
Community Support Team _ Janey

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.