Forum Discussion

SAPpowerbi's avatar
SAPpowerbi
Helper II
4 years ago
Solved

Count without blank rows

Hello Team ,

 

Please help me for below issue .

 

Source data in mtrix Table -

 

Service lineABC
Client Name(Revenue)(Revenue)(Revenue)
HP100 10
Asus 10 
Dell 100 

 

Like ABove Table service line A - is value in HP so i want count as 1 and
for B -service Line there is data for Asus nd dell so i want count as 2
and for HP there  is only 1 value ,so  i want 1 count .

 

SO i want below output based on above -

 

Service LineCount
A1
B2
C1

 

Kindly help me with the dax which count a value and show me without blank Count.
Thank you.

  • Hi SapPowerBI

     

    No DAX is required !  😀

     

    In Power Query unpivot you table to this ...

     

    Then create a visual table 

    with Service and Count Value.

    I will send an example in few minutes

13 Replies

  • Hi SapPowerBI

     

    No DAX is required !  😀

     

    In Power Query unpivot you table to this ...

     

    Then create a visual table 

    with Service and Count Value.

    I will send an example in few minutes

    • parry2k's avatar
      parry2k
      Super User

      speedramps what is the thought process to aggregate the data on PQ, just trying to understand?

  • SAPpowerbi does your source data in pivot form? How your source data looks like? You need to unpivot it and then it will be super easy to work with.

     

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort 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.

    • SAPpowerbi's avatar
      SAPpowerbi
      Helper II

      Hey Hi ,

      Source data is already unpioted , in above example i am using source as a matrix table from my Visvalization - i want ouput based on that -

      basically i want count without blank and the total.

    • SAPpowerbi's avatar
      SAPpowerbi
      Helper II

      SOurce data -

      RegionClinet DateValue
      UKHP1/1/202211
      UKHP1/1/202211
      UKHP1/1/202211
      UKHP1/1/202211
      UKHP1/1/202211
      USADell1/1/2022100
      USAAsus1/1/2022100

       

    • SAPpowerbi's avatar
      SAPpowerbi
      Helper II

      Hey Hi ,

      Source data is already unpioted , in above example i am using source as a matrix table from my Visvalization - i want ouput based on that -

      basically i want count without blank and the total.

    • SAPpowerbi's avatar
      SAPpowerbi
      Helper II

      Dummy SOurce Table -

      RegionClinet DateValue
      UKHP1/1/202211
      UKHP1/1/202211
      UKHP1/1/202211
      UKHP1/1/202211
      UKHP1/1/202211
      USADell1/1/2022100
        1/1/2022100
  • SAPpowerbi would you mind pasting what the source data looks like? Paste it in the table format? it should be straight forward but need to see how the source data looks like?

     

     

    Follow us on LinkedIn and  to our YouTube channel

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make effort 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.

  • SAPpowerbi what represents A/B/C from your original post. Can you stick to one data table? How do you expect someone to help you if you keep on changing the data? Just my 2 cents.

    • speedramps's avatar
      speedramps
      Super User

      Ha ha ha I agree with parry2k.

      You did change the data in the problem description.
      Which is a bit frustrating when volunteers are trying to help.

      Glad we found you a solution.

      But keep problem descriptions simple next time please  😀😀😀

  • Sorry you have completely confussed me. ☹️

    Please close this tickjet and start again with an new ticket with an exampe of your source data and what you require.

    Thanks 😁