Forum Discussion

Ronnie_L's avatar
Ronnie_L
Frequent Visitor
3 years ago
Solved

Measure Help

I need a measure to count the number of times each entry from column "UnitID" is in 39 columns labeled Unit2, Unit3,..., Unit40. 

 

There are about 800 UnitID's. The UnitID is in the form of A101, A102... through Z101, Z102... The 39 columns have the number of times the UnitId was Unit2...Unit40.

 

I'm new to Power BI and I keep getting errors or obviously bad numbers with my formulas. Below is a snip of the data.

 

Thanks for any help,

 

Ronnie

 

 

  • Hi, 

     

    could you unpivot the columns in power query then group by the attribute which would be the column title to do the count?

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

4 Replies

  • DOLEARY85's avatar
    DOLEARY85
    Resident Rockstar

    Hi, 

     

    could you unpivot the columns in power query then group by the attribute which would be the column title to do the count?

     

    If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

    • Ronnie_L's avatar
      Ronnie_L
      Frequent Visitor

      I had to include another column with the unpivot and it worked. 

       

      Thank you.

      • DOLEARY85's avatar
        DOLEARY85
        Resident Rockstar

        Do you have a copy of the PBIX file or the data i could look at?

         

  • Ronnie_L's avatar
    Ronnie_L
    Frequent Visitor

    Sorry, I'm not allowed to provide a copy of the file. Other people at my office are looking into the issue now. Thanks for trying to help.