Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sawn
Frequent Visitor

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

Screen Shot 2021-12-14 at 12.06.40.png 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sawn ,

 

You could create Gauge visual.

Capture.PNG

Please check the attached Pbix.

 

Best Regards,

Jay

View solution in original post

7 REPLIES 7
ValtteriN
Super User
Super User

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:
ValtteriN_0-1639474531311.png

 

 

I hope this helps to solve your issue and if it does consider accepting this as a solution and giving it thumbs up!

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Kindly share the pbix file for this. Thank you

Anonymous
Not applicable

Hi @sawn ,

 

You could create Gauge visual.

Capture.PNG

Please check the attached Pbix.

 

Best Regards,

Jay

Thanks, I would want my visuals to appear like below

 

Capture.JPG

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/


 

Anonymous
Not 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

 

Lagloire_0-1639474469539.png

 

 

Anonymous
Not 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

 

Lagloire_0-1639474189021.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.