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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
pagliaci
Frequent Visitor

Do an action based on reaching the target and then reset the counting

Hi, I have a column that counts the minutes that the machine was running for each event (normally three a day):

 

EVENT     TIME 

1               500

2               100

3               400

 

And then I have a measure that sees when we need to execute the activity in SAP. For example, Activity1 needs to be done every 600minutes, so after events 1,2, and 3 (1000minutes), my card turns red, meaning that we need to enter it on SAP. 

 

My problem is that I need to reset that after doing the action in SAP, but how do I reset that counting? Any idea on how to build this part? I need to make my card turn green again, based on some value, but I am having a hard time on how to build it. 

 

I appreciate some ideas, thank you!

1 ACCEPTED SOLUTION
daXtreme
Solution Sage
Solution Sage

Hi @pagliaci 

 

Well, the first thing that comes to mind is that you have to add some kind of timestamp to your data so that you know where you are in time. Since it's not possible to write back to the model from the UI itself (well, actually I think I've seen a video on YT that actually shows how to do write back to a model from the UI but I have not watched it, maybe try to find it?), you'll have to modify your backstore data and then schedule a refresh of the model for it to be able to see if an action has been taken (you could refresh manually as well as soon as you update your data). This action must be logged in your data as well with a timestamp (in a hidden table maybe). Then, when you re-load/refresh, the model/measure(s) can be programmed in such a way that it looks at the action taken, the timpstamps in both tables and based on this knowledge it can figure out if it should reset itself and what status to show. This is how I'd first approach it...

View solution in original post

1 REPLY 1
daXtreme
Solution Sage
Solution Sage

Hi @pagliaci 

 

Well, the first thing that comes to mind is that you have to add some kind of timestamp to your data so that you know where you are in time. Since it's not possible to write back to the model from the UI itself (well, actually I think I've seen a video on YT that actually shows how to do write back to a model from the UI but I have not watched it, maybe try to find it?), you'll have to modify your backstore data and then schedule a refresh of the model for it to be able to see if an action has been taken (you could refresh manually as well as soon as you update your data). This action must be logged in your data as well with a timestamp (in a hidden table maybe). Then, when you re-load/refresh, the model/measure(s) can be programmed in such a way that it looks at the action taken, the timpstamps in both tables and based on this knowledge it can figure out if it should reset itself and what status to show. This is how I'd first approach it...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.