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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vincentakatoh
Helper IV
Helper IV

Alternative to SUMMARIZECOLUMNS

Hi, 

Currently, I'm using NewTable, SummarizeColumns to calculate a cummulative yield. 

 

Que: Is there any other method to calculate the "Yield" without using Newtable, SummariseColumns.

 

Will like to achieve the "Yield" calculation using the original table. This way, I can retain fields in the orignal table and add new filters for each fields.

 

In the summarizecolums, the fields are limited to area, line and station. And any new fields that are added to the summarizecolumns impact the way "Yield" is calculated. 

 

 

Yield Roll Table = 
    SUMMARIZECOLUMNS(
        data[Area],
        data[Line],
        data[station],
        "Count of Pass",COUNTROWS(FILTer('data',[test results]="P")),
        "Count of Fail",COUNTROWS(FILTer('data',[test results]="F")),
        "Yield",DIVIDE([CountPass],[CountPass]+[CountFail],1)
        )

New measure

Roll Yeild = PRODUCT([Yield])

2017-08-01 22_55_48-Production Yield Calculation 0424 - phil - Power BI Desktop.png

 

http://community.powerbi.com/t5/Desktop/Production-Yield-Calculation/td-p/163626

 

 

4 REPLIES 4
v-yulgu-msft
Employee
Employee

Hi @vincentakatoh,

 

You can still get the desired yield value via creating measures without creating new table using SUMMARIZECOLUMNS.

CountFail = COUNTROWS(FILTER('data', [test results] = ("f")))
CountPass = COUNTROWS(FILTER('data', [test results] = ("p")))
Yield = DIVIDE([CountPass],([CountPass]+[CountFail]),0)

You can directly add measure [YieID] into value area in a matrix. Also, I noticed that above measure are all existing in the pbix file from the link you provided.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft

 

The problem is a with the cummulative calcuation. Line 1 Yield is a product of Station 1 and Station 2 yield. 

 

Line1 Yield = S1 yield (66.7%) * S2 Yield (33.3%) = 22.2% (achievable using SummariseColumns). 

 

Nonetheless, if by using a simple measure Line 1 Yield will be a count of all F and P in S1 and S2. 

Hi @vincentakatoh,

 

As you need to get the ummulative calcuation via Product function, and we can only add a column inside this function, personally, I think creating a new column to get the Yield first might be a best choice. If you don't wat to create new table via SUMMARIZECOLLUMNs, you could directly create Yield column in source table.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft

 

Can advise how to write the DAX (for the cummulative calculation)? How has to be done using M in Query Editor? Will be really great if you can provide the PBI file using below link (contributed by @Phil_Seamark). It has the values using SummariseColumns, the objective is to get the same results using new column (in same table). 

 

http://community.powerbi.com/t5/Desktop/Production-Yield-Calculation/td-p/163626

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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