Forum Discussion
Count without blank rows
Hello Team ,
Please help me for below issue .
Source data in mtrix Table -
| Service line | A | B | C |
| Client Name | (Revenue) | (Revenue) | (Revenue) |
| HP | 100 | 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 Line | Count |
| A | 1 |
| B | 2 |
| C | 1 |
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
- speedrampsSuper User
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
- parry2kSuper User
speedramps what is the thought process to aggregate the data on PQ, just trying to understand?
- parry2kSuper User
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.
- SAPpowerbiHelper 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.
- SAPpowerbiHelper II
SOurce data -
Region Clinet Date Value UK HP 1/1/2022 11 UK HP 1/1/2022 11 UK HP 1/1/2022 11 UK HP 1/1/2022 11 UK HP 1/1/2022 11 USA Dell 1/1/2022 100 USA Asus 1/1/2022 100
- selimovdMost Valuable Professional
- SAPpowerbiHelper 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.
- SAPpowerbiHelper II
Dummy SOurce Table -
Region Clinet Date Value UK HP 1/1/2022 11 UK HP 1/1/2022 11 UK HP 1/1/2022 11 UK HP 1/1/2022 11 UK HP 1/1/2022 11 USA Dell 1/1/2022 100 1/1/2022 100
- parry2kSuper User
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.
- parry2kSuper User
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.
- speedrampsSuper 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 😀😀😀
- speedrampsSuper User
As promissed here is a solution using unpivot.
Please click the thumbs up and Accept As Solution to leave kudos
- speedrampsSuper User
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 😁