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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

% of 2 columns .. I am missing something

I am looking to calculate a backup % success rate ... I followed the below:

pbi 1.png

 

So my measure looks like the below and I get the error underneath ... 

pbi 2.png

 here are the columns:

pbi 1.png

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You have formatted the units to get .004.

 

Select your measure, the ribon above should pop up.

 

Else you can use the format measure. 

 

Measure = Format ([your Measure] , "Percent")

 

https://dax.guide/format/

 

Regards,

Harsh Nathani

 

 

View solution in original post

11 REPLIES 11
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly. If not, please kindly elaborate more. thanks!

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
harshnathani
Community Champion
Community Champion

HI @Anonymous ,

 

Try 

 

Divide(Sheet1[Backup Failure] , Sheet1 [Backup Success])

 

Or 

Divide(Max(Sheet1[Backup Failure] ), Max(Sheet1 [Backup Success]))

 

Regards,

HN

 

Anonymous
Not applicable

Hi @harshnathani 

 

I tried the below ... 

pbi 2.png

 

The correct % when the 2 numbers are done correctly is around 99.57% ... I tried COUNT and it gave me 1.00. 

 

When I tried:

Divide(Sheet1[Backup Failure] , Sheet1 [Backup Success])

 

it gave me the error of:

pbi 1.png

 

 

 

Hi @Anonymous ,

Try Sum instead of Count. 

 

Incase the issue is not resolved, pls share sample Data.

 

Regards,

Harsh

Anonymous
Not applicable

@harshnathani 

 

I tried SUM and it moved it back to 0.00

 

Here are the 2 datapoints in those columns ...

 

pbi 1.png

Hi @Anonymous ,

 

Create a measure

 

Div =

Var a = Calculate (Max(sheet1[Backup Success]), Filter (Sheet1, Sheet1 [Type] = "Success"))

 

Var b =  Calculate (Max(sheet1[Backup Failure]), Filter (Sheet1, Sheet1 [Type] = "Failed"))

 

 

Return

 

Divide(b,a)

 

 

 

Regards

HN

Anonymous
Not applicable

@harshnathani 

 

I used your above code:

 

pbi 1.png

 

Here is the result of it ... 

 

pbi 2.png

 

I switch the Divide(a,b) to Divide(b,a)  just to see what would happen and got 0.00

 

 

Hi @Anonymous ,

 

Increase the decimal points.

 

11/2502 = 0.00440

 

 

1.jpg

 

Change the value from 0 to 4 in the circle above and drop down should have decimal.

 

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

Anonymous
Not applicable

@harshnathani I formatted the units to get .004 % ... not sure how to show that in percent form though. 

 

 

I found this is another post searching ... I dont have those options in my ribbon:

 

https://community.powerbi.com/t5/image/serverpage/image-id/13676iB2044AB000922EEE/image-size/large?v... 

 

Hi @Anonymous ,

 

You have formatted the units to get .004.

 

Select your measure, the ribon above should pop up.

 

Else you can use the format measure. 

 

Measure = Format ([your Measure] , "Percent")

 

https://dax.guide/format/

 

Regards,

Harsh Nathani

 

 

Anonymous
Not applicable

I switch the data up a little to see about making it easier ... put everything on 1 row and then created a calculated column of failure + success ... with hopes of being able to then just divide success into backup total count

 

pbi 1.png

 

However, now it wont find the success or total count columns to make the formula ... I tried adding sheet1 in there, but did not do anyting helpful.

 

pbi 1.png

 

 

 

then I tried the above code and updated some to the new column I added .. 

 

% Success =

Var a = Calculate (Max(sheet1[Backup Success]), Filter (Sheet1, Sheet1 [Type] = "Success"))

Var b = Calculate (Max(Sheet1[Backup Total Count]), Filter (Sheet1, Sheet1 [Type] = "Total"))

Return

Divide(a,b)
 
 
... did not return anything 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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