cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
AnneC
Advocate I
Advocate I

Counting Same Data that Occurs over Multiple Years

Hi Everyone

 

I have a problem, and any help would be appreciated.  In our organisation individuals can participate once or multiple times within a year, or alternatively, not at all.  Each individual has a unique identifier.

 

I am not interested in how many times an individual has participated over a year, just whether they did particpate, but I need to do this over multiple years and they need to be consecutive, so if my data looked like this:

YearUnique Identifier
2016A
2016B
2016B
2016D
2016E
2017A
2017B
2017C
2017C
2017D
2017E
2018A
2018B
2018C
2018D
2018D
2018D
2018D
2019A
2019A
2019B
2019D
2019E

 

The result for 2016-2019 would be:

Unique Identifier2016-2019 Count
A4
B4
C0
D4
E0

 

However, if I looked at only 2017-2018 in my slicer, then the results would be:

Unique Identifier2017-2018 Count
A2
B2
C2
D2
E0

Any assistance would this problem would be greatly appreciated.  Thanks in advance.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ElenaN
Resolver V
Resolver V

Hello,

 

You can try this:

 

Measure =
VAR YearCount = COUNTROWS(FILTERS(Table3[Year]))
RETURN
IF(DISTINCTCOUNT(Table3[Year]) = YearCount, YearCount, 0)
 
Regards,
ElenaN

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors