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
tk_moe
Frequent Visitor

Count records if they hit a designated time internal

I have multiple records for an account with dates of the record occurrence and I only want to count the initial record plus records where the date difference between them hits 30 days between occurrences. 

 

In the below example, we count the first occurrence. We count the next occurrence after 30 days, which is at day 35, so we count that record. We start the counting again at day 35, plus 30 more days, we get 65, so the next record we want to count is the next one in the table, which is day 84. Start at day 84, plus 30 more days and the next record to count is day 125.

 

How do I use DAX to achieve this to only count the 4 records?

Record counts w 30 day intervals.png

 

 

2 REPLIES 2
tk_moe
Frequent Visitor

Yes, this is what I'm trying to do. I need help with the DAX for this, which is why I posted. Thank you!

v-xiaotang
Community Support
Community Support

Hi @tk_moe 

Thanks for reaching out to us.

>> How do I use DAX to achieve this to only count the 4 records?

usually we create 2 measures, the first measure we use it to determine whether the data meets the requirements, and return 1 if the requirements are met. Then use the second measure to count.

 

 

Best Regards,

Community Support Team _Tang

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

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.