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

Counting items within a timeframe

Hello, I pulling data as an admin on datasets, when and what time they are refreshed. I am trying to count the number of datasets being refreshed every 30 min from 6AM to 10AM daily. I have a column for dataset name, date it was refreshed and start and end time for each one. Again, trying to determin number of items being refreshed every 30 min. 

 

DatasetDateStart End 

store report 

5/05/241:47:47PM 
daily sales report 5/05/248:46:46AM 
FIeld POI5/05/2412:00:49 AM12:02:59 AM

 

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

Hi, @monica2563 

Based on your description, I created the following sample data:

vjianpengmsft_0-1715573804479.png

You'll need to create a schedule like this:

vjianpengmsft_1-1715573864821.png

This schedule consists of 30-minute time slots from 6:00 to 10:00. You can use the following DAX expression to figure out which items are successfully refreshed every 30 minutes:

Refresh Count = 
VAR _seleted = SELECTEDVALUE(Table3[time])
VAR _start_time = FORMAT(TIMEVALUE(LEFT(_seleted,11)),"hh:mm:ss")
VAR _end_time = FORMAT(RIGHT(_seleted,11),"hh:mm:ss")
RETURN CALCULATE(COUNTROWS('Table'),
    FILTER('Table',
        FORMAT('Table'[Start Time],"hh:mm:ss")>=_start_time&&
        FORMAT('Table'[End Time],"hh:mm:ss")<=_end_time
    )
)

The results are as follows:

vjianpengmsft_2-1715574026590.png

vjianpengmsft_3-1715574124282.png

The above is a reference, and you can adjust it appropriately according to your actual situation. I've provided the PBIX file used this time below.

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

 

View solution in original post

3 REPLIES 3
v-jianpeng-msft
Community Support
Community Support

Hi, @monica2563 

Based on your description, I created the following sample data:

vjianpengmsft_0-1715573804479.png

You'll need to create a schedule like this:

vjianpengmsft_1-1715573864821.png

This schedule consists of 30-minute time slots from 6:00 to 10:00. You can use the following DAX expression to figure out which items are successfully refreshed every 30 minutes:

Refresh Count = 
VAR _seleted = SELECTEDVALUE(Table3[time])
VAR _start_time = FORMAT(TIMEVALUE(LEFT(_seleted,11)),"hh:mm:ss")
VAR _end_time = FORMAT(RIGHT(_seleted,11),"hh:mm:ss")
RETURN CALCULATE(COUNTROWS('Table'),
    FILTER('Table',
        FORMAT('Table'[Start Time],"hh:mm:ss")>=_start_time&&
        FORMAT('Table'[End Time],"hh:mm:ss")<=_end_time
    )
)

The results are as follows:

vjianpengmsft_2-1715574026590.png

vjianpengmsft_3-1715574124282.png

The above is a reference, and you can adjust it appropriately according to your actual situation. I've provided the PBIX file used this time below.

 

 

How to Get Your Question Answered Quickly

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Jianpeng Li

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

 

thank you for your help !!

ryan_mayu
Super User
Super User

could you pls provide more data? based on the sample data, we can't see any dataset refreshed every 30 mins. What about refreshed every 29 or 31 mins? Could you pls explain more about your request?





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

Proud to be a Super User!




Helpful resources

Announcements
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.

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.