Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Summarize Table

Hi guys,

I have a trouble here.

There are two tables


And other table


Both have the colummns CodUser in comun

I´m doing a new table with [colaboradores]  (Distict value) and count of columm [diferenca] with values no blank.

A new table like
[colaboradores] [diferenca]
Pablo                   15
Joao                     8

Follow the relantiohip 



Thank´s 





  • Hi, Anonymous 

     

    You can try to new a table then rank, Like this:

    New Table =
    SUMMARIZECOLUMNS (
        Colaboradores[Colaborador],
        "Difference", CALCULATE ( COUNTROWS ( PontoB[Diferenca] ), [Diferenca] = "Debito" )
    )
    

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please feel free to ask me.

     

    Best Regards,
    Community Support Team _ Janey

4 Replies

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Try

     

    New Table =
        SUMMARIZECOLUMNS(
            Colaboradores[Colaborador],
            "Distinct Count", DISTINCTCOUNT(PontoB[Diferenca])
        )

    parry2k  is right though a measure would do the job or you could add a calculated column to Colaboradores.

     

  • Anonymous where you are doing distinct count? Why do you want to create a new table? You can simply write a measure and visualize it?

     

    Follow us on LinkedIn

     

    Learn about conditional formatting at Microsoft Reactor

    My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

     

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • Anonymous's avatar
      Anonymous
      Not applicable

      I want a new table showing all "Colaboradores", and a columm with sum of "Diferenca" including the "Colaboradores" withouf diference.

       

      Because after i need rank and show a table like this

       

       

      • v-janeyg-msft's avatar
        v-janeyg-msft
        Community Support

        Hi, Anonymous 

         

        You can try to new a table then rank, Like this:

        New Table =
        SUMMARIZECOLUMNS (
            Colaboradores[Colaborador],
            "Difference", CALCULATE ( COUNTROWS ( PontoB[Diferenca] ), [Diferenca] = "Debito" )
        )
        

        Did I answer your question ? Please mark my reply as solution. Thank you very much.
        If not, please feel free to ask me.

         

        Best Regards,
        Community Support Team _ Janey