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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aslure
Regular Visitor

Count ID and Chart Occurrence

I want to count how many times an ID shows up in a given time frame and show that as a chart. I created a column that converts the date into the week of the year. What I am trying to show is how many times someone came into the building in a given week.

 

Table_1

IDDateWeek
12341/1/2022Week 1
12341/2/2022Week 1
12351/1/2022Week 1

 

Chat

 

 Frequency    
 12345
Week 112   
Week 2     
Week 3     
….     
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @aslure,

I'm not so clear about your frequency field definitions, can you please share some detail about these? They will help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

In addition, you can also try to use the following measure formula if helps:

formual =
CALCULATE (
    COUNTA ( Table[ID] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[Week] ),
    VALUES ( Table[frequency] )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @aslure,

I'm not so clear about your frequency field definitions, can you please share some detail about these? They will help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

In addition, you can also try to use the following measure formula if helps:

formual =
CALCULATE (
    COUNTA ( Table[ID] ),
    ALLSELECTED ( Table ),
    VALUES ( Table[Week] ),
    VALUES ( Table[frequency] )
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@aslure , With help from i ndependent date table and group by

 

Cnt measure = count(Table[ID])

//Idependent table

Bucket Table = Addcolumn( generateseries(1, 100,1), "Bucket Name", "Bucket " & format([value], "00"))

 

Countx(filter(values(table[Week]) , [Cnt measure] =Max('Bucket Table'[Value])), [CourseName])

 

 

Refer

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

What are you referring to when you say [CourseName]?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.