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

Summing Occurrences without losing Date information

I am trying to sum occurences based on company while still maintaining a date of occurence relationship. That way, if I want to filter out occurences based on when they happened, the count will adjust accordingly. I tried creating a reference to the originial fact table that is related to my Calendar DIM table, but this does not allow me to filter visuals using the summed occurences. Below I have attached a visual:

IHargrave_0-1642109944513.png

Notice that each occurence has a date attached in the original table. If I wanted to filter for a date ranging from say months 1-3, I need to maintain a relationship of the counted instance table to the calendar table. Let me know if more information is needed. Thanks,

Isaac.

1 ACCEPTED SOLUTION
ALLUREAN
Solution Sage
Solution Sage

Hi, @Anonymous 

 

Try something like (calculated column):

 

Occurence = COUNTX ( FILTER ( Table, EARLIER ( Table[Company] ) = Table[Company] ), Table[Company] )

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/

 




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




View solution in original post

2 REPLIES 2
bcdobbs
Super User
Super User

If you want it to update dynamically you need to use a measure.

If you create one like this:

 

Company Count = COUNTROWS ( YourTable )

 

 

and then use it in a matrix with company on the rows and the measure in the values.

 

Example File 



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
ALLUREAN
Solution Sage
Solution Sage

Hi, @Anonymous 

 

Try something like (calculated column):

 

Occurence = COUNTX ( FILTER ( Table, EARLIER ( Table[Company] ) = Table[Company] ), Table[Company] )

 

Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.

Appreciate your Kudos !!!

https://allure-analytics.com/

https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA

https://www.linkedin.com/company/77757292/

 




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


https://allure-analytics.com/
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/

Proud to be a Super User!




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.