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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
KVPBI1
New Member

Formula to return a count for given criteria

I have a dataset that includes multiple IDs and expiration buckets. Each ID should only have one count per bucket.

 

Dataset 
IDExpired
130
10
130
260
290
330
330
330

 

Expected Result
ExpiredCount
302
601
901

 

Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@KVPBI1 , Use a measure

 

Distinctcount(Table[ID]) in a visual with Expired

 

or calculate(Distinctcount(Table[ID]), filter(Table, table[Expired] <>0 ))

View solution in original post

2 REPLIES 2
v-chenwuz-msft
Community Support
Community Support

Hi @KVPBI1 ,

 

Or you can use the functions provided by power bi to achieve the results you want. Please refer to the gif below.

vchenwuzmsft_0-1664784348338.gif

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@KVPBI1 , Use a measure

 

Distinctcount(Table[ID]) in a visual with Expired

 

or calculate(Distinctcount(Table[ID]), filter(Table, table[Expired] <>0 ))

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.