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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
kekepania0529
Helper I
Helper I

Power BI - Calculated Column = Calculated Column divided by Distinct Count Column

I have 2 calculated columns, separately they work as intended: 

  • GT/LB Shipped = IF(LEFT('Inbound Detail'[Product Group],3)="Non",'Inbound Detail'[Adjusted Net],'Inbound Detail'[Adjusted Net GT])
  • Loads = CALCULATE(DISTINCTCOUNTNOBLANK('Inbound Detail'[Ticket #]))

I created a new calculated column to figure out the GT/LB per Load, but it returns the GT/LB Shipped, instead of the GT/LB per Load, like it's ignoring the Loads distinct count:

  • GT/LB per Load = DIVIDE('Inbound Detail'[GT/LB Shipped],[Loads],0)
kekepania0529_0-1634241616947.png
 kekepania0529_1-1634241968342.png

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Try using a measure instead of a calculated column since the calculated column will create an implicit measure that sums up each row of the column rather than the ratio that you want.

 

GT/LB per Load =
DIVIDE (
    SUM ( 'Inbound Detail'[GT/LB Shipped] ),
    SUM ( 'Inbound Detail'[Loads] ),
    0
)

 

 

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

Try using a measure instead of a calculated column since the calculated column will create an implicit measure that sums up each row of the column rather than the ratio that you want.

 

GT/LB per Load =
DIVIDE (
    SUM ( 'Inbound Detail'[GT/LB Shipped] ),
    SUM ( 'Inbound Detail'[Loads] ),
    0
)

 

 

Thank you! That worked! 😎

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors