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
StuartSmith
Power Participant
Power Participant

Incorrect Percentage Value

I have a table containing 67 row...

Count_Total_Row_Measure = COUNTROWS(Services)

 
That contains a column called "VoWiFi" that contains 22 "Yes" values...
Count_Rows_Where_No_Measure = CALCULATE(COUNTROWS(Services),SEARCH("Yes", Services[VoWIFI],,0))
 
I then want to get the percentage of rows containing "Yes" values from the number of rows.
VoWiFi % YESS = DIVIDE(CALCULATE(COUNTROWS(Services),SEARCH("Yes", Services[VoWIFI],,0)), CALCULATE ( COUNT ( 'Services'[VoWIFI] ), ALLSELECTED ( 'Services'[VoWIFI])))
 
But instead of giving "32.83%", the output is "0.79".  What am i doing wrong
2020-09-17_12-14-51.jpg
1 ACCEPTED SOLUTION

@StuartSmith , I created

Measure = DIVIDE([Count_Rows_Where_No_Measure],[Count_Total_Row_Measure])

 

Marked it as % type and seems to to give the number you want

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@StuartSmith , first one done not have all selected

 

then you should try

VoWiFi % YESS = DIVIDE(CALCULATE(COUNTROWS(Services),SEARCH("Yes", Services[VoWIFI],,0)>0), CALCULATE ( COUNT ( 'Services'[VoWIFI] )))

 

or

 

VoWiFi % YESS = DIVIDE(CALCULATE(COUNTROWS(Services),SEARCH("Yes", Services[VoWIFI],,0)>0), CALCULATE ( COUNT ( 'Services'[VoWIFI] ), ALL( 'Services'[VoWIFI])))

 

VoWiFi % YESS = DIVIDE(CALCULATE(COUNTROWS(Services),SEARCH("Yes", Services[VoWIFI],,0)>0), CALCULATE ( COUNT ( 'Services'[VoWIFI] ), ALLSELECTED ( 'Services'[VoWIFI])))

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Neither of the below changed the result. 

 

Find below a sample file...

https://www.dropbox.com/s/kwhnnio9q2lceu8/Sample.pbix?dl=0

 

@StuartSmith , I created

Measure = DIVIDE([Count_Rows_Where_No_Measure],[Count_Total_Row_Measure])

 

Marked it as % type and seems to to give the number you want

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.