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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Solong
New Member

Calculating the sum of a count Column

Hello all, 

 

I ma having trouble with calcumating the yeild of my table.  I would liek to calculate the yeild of Sum of Total_pass_count by the Total count. When i go and graph the total counts it shows the total sum that pass. But i can get **bleep** to calculate the sum of total pass per lot number by the total strip count.  Help woudl be much appreciated. 

 

Solong_0-1682427451290.png

 

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Solong ,

 

It's the Power Query forum. But the screenshot provided appears to be present in Power BI Desktop.

And the [Total_pass_count] and the [Total_count] are columns, right?

Here're 2 solutions. One is implemented in PQ and the other is implemented using DAX.

In Power Query:

1.Group by as follows.

vstephenmsft_0-1682575808839.png

vstephenmsft_1-1682575907015.png

vstephenmsft_2-1682575926283.png

2.Expand it.

vstephenmsft_3-1682575948056.png

vstephenmsft_4-1682575959767.png

In Power BI Desktop, using DAX:

Create a calculated column.

Column = CALCULATE(SUM('Table'[Total_count_pass]),FILTER('Table',[Total_count]=EARLIER('Table'[Total_count])))

vstephenmsft_5-1682577910384.png

 

 

                                                                                                                                                         

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.           

 

 

@v-stephen-msft  No Total_ count_ pass and Total count are calculated column. I am not sure if that make a diffrence.  

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors