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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
dubya
Regular Visitor

Add a division calculation between 2 values in the same column!

Hello, 

 

I am attempting to divide 2 rows in the same column. i.e. and receive a percentage of items that hit the "review" activity after the "start" activity? 

 

Capture.JPGCapture 2.JPG

 

This could be accomplished on the model itself or via a quick measure on the report itself.

 

Thank you! 

1 ACCEPTED SOLUTION
MNedix
Super User
Super User

The formula is written for the main PowerBI not Power Query. Do you really need to create the column in Power Query?

 

I've attached the pbix



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

View solution in original post

4 REPLIES 4
MNedix
Super User
Super User

The formula is written for the main PowerBI not Power Query. Do you really need to create the column in Power Query?

 

I've attached the pbix



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

You create the column like the below:

MNedix_0-1728590997111.png

 

Or like this

MNedix_1-1728591071391.png

 



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,
MNedix
Super User
Super User

Heya,

 

Here is the code:

 

Forum = 
VAR _start = CALCULATE(SUM('Table'[Count]),'Table'[Activity]="Start",ALLEXCEPT('Table','Table'[Office Worker]))
VAR _review = CALCULATE(SUM('Table'[Count]),'Table'[Activity]="Review",ALLEXCEPT('Table','Table'[Office Worker]))
RETURN
IF('Table'[Activity]="Start", BLANK(), DIVIDE(_review,_start))

 

PS: Format the new column as Percentage and you're good to go

 



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Thank you for the quick reply, I am having some trouble getting it to take!

 

I get an token eof on the first line? 

 

dubya_0-1728589335559.png

 

Thank you!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.