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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ZoltanT
Frequent Visitor

Units per year per activity

Hi

 

I am new to this so this is most likely a simple one. 

 

I need to count the amount of times (units) an activity occured during a financial year. Eg.

 

ActivityFinancial YearUnits
Activity 120183
Activity 120183
Activity 120183
Activity 220182
Activity 220182
Activity 320181
Activity 420181
Activity 120192
Activity 120192
Activity 220191
Activity 320194
Activity 320194
Activity 320194
Activity 320194
Activity 420192
Activity 420192

 

Thank you in advance

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @ZoltanT ,

 

You can use ALLEXCEPT() function.

 

units = CALCULATE(COUNT('Table'[Activity]),ALLEXCEPT('Table','Table'[Activity],'Table'[Financial Year]))

 

3.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

This calculated column formula works

=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Activity]=EARLIER(Data[Activity])&&Data[Financial Year]=EARLIER(Data[Financial Year])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-jayw-msft
Community Support
Community Support

Hi @ZoltanT ,

 

You can use ALLEXCEPT() function.

 

units = CALCULATE(COUNT('Table'[Activity]),ALLEXCEPT('Table','Table'[Activity],'Table'[Financial Year]))

 

3.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

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

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
amitchandak
Super User
Super User

@ZoltanT ,You can use count(Table[Activity]) , sum(Table[Unit]) in any visual with row/group by as finanacial year

Ashish_Mathur
Super User
Super User

Hi,

Please show the exact result that you are expecting?


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

Hi @Ashish_Mathur 

 

The results I am expecting is in the third colum (units) shown in my example

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.