Forum Discussion
Need help with Counting distinct occurrences
Hello, I would like to count the number of occurrences of water points either new or rehabilitated and visualize the numbers separately in charts. How do I go about this? Thank you
- Anonymous4 years ago
7 Replies
- AnonymousNot applicable
Hi,
I have almost the same problem and looking for DAX function to be used to solve this.
In my below table, i'd like to count number of occurences of title per month. For example, in June we have 2 title, In August we have 3 etc......
How can i go about this?
Thank you
- AnonymousNot applicable
Hi,
I'm looking for DAX function to be used to solve this.
In my below table, i'd like to count number of occurences of title per month. For example, in June we have 2 title, In August we have 3 etc......
How can i go about this?
Thank you
- ValtteriN
Community Champion
Hi,
There are multiple ways to do this which all differ based on your specific need.
Here are some examples:
Simple measure = count('Water'[Structure])
Measure with filters:water =CALCULATE(COUNTX(filter(filter(Water,Water[Type] in {"New","Rehabilated"}),Water[Structure]="Water point"),Water[Structure]))
Filter the visual:I hope this helps to solve your issue and if it does consider accepting this as a solution and giving it thumbs up!
- sawnFrequent Visitor
Thanks, I would want my visuals to appear like below
- VahidDM
Super User
HI sawn
Try these measures:
No. of Rehabilitated Water Points =
CALCULATE(COUNTA(Water[Structure]),filter(Water,Water[Type]="Rehabilitated"&&Water[Structure]="Water point"))No. of New Water Points =
CALCULATE(COUNTA(Water[Structure]),filter(Water,Water[Type]="New"&&Water[Structure]="Water point"))If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
- sawnFrequent Visitor
Kindly share the pbix file for this. Thank you
- AnonymousNot applicable