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
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

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.