cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
bbg
Regular Visitor

Create measure that shows the percentage of late delivered orders, based on total amount, per city

Hello,

I have a PowerBI dataset showing the city, order amount and a column that says if the order was late or not. How can I create a measure that shows, for each city, the late orders amount as a percentage of total order amount for that specific city. See the Excel example below.

The "Late" column is itself a calculate column based on two date columns, if that matters. Thank you!

 

bbg_0-1695651206857.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bbg , Create measures like

 

Late = calculate(Sum(Table[order Amount]), filter(Table, table[Late] ="Yes") )

 

Late % = divide([Late], Sum(Table[order Amount]) )

View solution in original post

3 REPLIES 3
bbg
Regular Visitor

I tried again and it worked. Thanks!

amitchandak
Super User
Super User

@bbg , Create measures like

 

Late = calculate(Sum(Table[order Amount]), filter(Table, table[Late] ="Yes") )

 

Late % = divide([Late], Sum(Table[order Amount]) )

Thanks, @amitchandak . My "Late" column indicator and my amount column are in different tables and the Late column does not show up when I type it in the formula bar, if that makes sense. Is that a condition for the two columns to be used in the same formula? 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors