Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Summarizing data

Dear Power BI users,

 

I have a question about the below mentioned table (ORIGINAL TABLE).

as you can see we have several lines per container_nr..

Some lines do have a S01 in the colums code_cod, some not

 

I am looking for for a formula/ filter wich gives me a summary of the order_nr & container_nr and a YES if in the original table a line is present with S01 in the colum code_cod.

 

Thanks for your kind help!

 

John

 

RESULT TABLE:

order_nrcontainer_nrfoto_fee_in_estimate
8837312TTNU8968305YES
8843422TTNU8967839YES
8281616TTNU8967280YES
8824972TTNU8965564NO
8814244TTNU8965121NO
8826854TTNU8612361NO
8821072TTNU8610121NO

 

ORIGINAL TABLE:

order_nrcontainer_nrcode_cod
8837312TTNU8968305A01
8837312TTNU8968305S01
8843422TTNU8967839A03
8843422TTNU8967839A04
8843422TTNU8967839S01
8281616TTNU8967280D09
8828579TTNU8967280D09
8281616TTNU8967280S01
8824972TTNU8965564B08
8824972TTNU8965564E51
8814244TTNU8965121A03
8826854TTNU8612361A01
8821072TTNU8610121A01
  • Anonymous's avatar
    Anonymous
    7 years ago

    This should work:

    Table = 
    SUMMARIZE(
        Table1,
        Table1[order_nr],
        Table1[container_nr],
        "foto_fee_in_estimates",
        If(
            CALCULATE(
                COUNTROWS(Table1),
                    Table1[code_cod]="S01") >=1,
                    "Yes","No"
        )
    )

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    This should work:

    Table = 
    SUMMARIZE(
        Table1,
        Table1[order_nr],
        Table1[container_nr],
        "foto_fee_in_estimates",
        If(
            CALCULATE(
                COUNTROWS(Table1),
                    Table1[code_cod]="S01") >=1,
                    "Yes","No"
        )
    )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Good morning Nick,

       

      Thanks, works oke for me!

       

      Regards,

       

      John