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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dolphin18
Frequent Visitor

How to add checkboxes and timestamps to my table in Power Query/Excel?

Hello,

 

I know Power Query does not offer the ability to direcctly add Form Controls, but is there another work around to add in checkboxes?

I wrote a query to pull orders for each day. The user wants to be able to check off the order if it was actually received for that day and to show what day and time they checked off the order. I am not sure if I could write a VBA code to add in the checkboxes for each line item and the time stamps once it has been checked off. I am not that familiar with VBA, but I have seen things on how to add that in. However, I am not sure if the VBA code will be in sync with my query when I refresh it because the new orders will populate and old orders will fall off.

 

Below is what I would like my table to look like:

 

IDDescriptionOrder DateOrder Expected DateReceived? 
1Apples3/25/254/20/25X4/20/25 16:45
2Oranges2/10/254/20/25X4/20/25 16:45
3Lemons2/15/254/30/25  
4Limes4/01/255/1/25X4/20/25 16:45

 

FYI: The user will be utilizing this table in Excel not in PowerBI.

Any help, advice, or other suggestions would be greatly appreciated! Thanks!

1 ACCEPTED SOLUTION
Akash_Varuna
Super User
Super User

Hi @dolphin18 You could do this by combining Power Query and VBA. Use Power Query to generate the table and VBA to add checkboxes in the "Received?" column. Write a macro to insert checkboxes for each row and another to record timestamps when checkboxes are checked. After refreshing the table in Power Query, re-run the VBA macro to realign the checkboxes.

View solution in original post

5 REPLIES 5
v-saisrao-msft
Community Support
Community Support

Hi @dolphin18,

Thank you for reaching out to the Microsoft Fabric Forum Community.

Thank you @Akash_Varuna, for your insights.

As an alternative to using checkboxes and VBA, I’d like to suggest a more data-driven approach if your source data includes a field that indicates whether an order has been received (for example, a "Received Date" or "Status" column). 

Instead of using manual checkboxes, you can handle the "Received" status directly in Power Query by adding a custom column that evaluates this field. For instance, using a conditional statement, you can flag orders as received (1) or not received (0). 

 

If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.

 

Thank you. 

Akash_Varuna
Super User
Super User

Hi @dolphin18 You could do this by combining Power Query and VBA. Use Power Query to generate the table and VBA to add checkboxes in the "Received?" column. Write a macro to insert checkboxes for each row and another to record timestamps when checkboxes are checked. After refreshing the table in Power Query, re-run the VBA macro to realign the checkboxes.

Hi @Akash_Varuna, thank you for the suggestion! I was able to do as you said and got both to work together. However, when I uncheck a box, the timestamp will stay in the column next to the checkbox. Do you know how the timestamp can be removed when I uncheck a box?

@dolphin18 you can modify the VBA macro to include a condition that clears the timestamp cell if the checkbox is unchecked

Thank you! I added a condition and it is working now!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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