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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors