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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
tgardner
Helper I
Helper I

(PowerBI/Apps) - Confusing potential glitch with OnSelect of Data table column (only within PowerBI)

The goldest of medals for anybody that can solve this. Apologies if it's more a PowerApps issue...but it's only an issue WITHIN PowerBI any potential help is beneficial.

Not sure if this is a genuine glitch that I need to report or something there is a solution to, so no harm in trying.

 

The scene, simply, is:

I'm trying to count the number of times a column is clicked (the ultimate purpose is developing a double click feature)

Landing on the page (OnVisible) sets the variable to 0

Clicking on the column (OnSelect) triggers Switch(var, 0, Set(var, 1), 1, Set(var, 2))

This works as expected BOTH on the column and also in a standalone button when in the browser/development environment

 

HOWEVER

 

When embedding the PowerApp as one of the 'charts' in PowerBI, the Data table column OnSelect function does not register every alternate click

So two clicks takes us to 1, two clicks takes us to 2 etc.

However, it does work when the code is in the button

 

So I can determine that it's ONLY an issue with PowerBI (not browser version) and ONLY an issue with the data table (not the button)...but this brings me no closer to logically having any idea what the issue is.

The same error for myself and a colleague. As you can imagine, this potential glitch makes it very difficult for me to implement my 'double click' feature since it makes the first and second click indistinguishable.

 

ANY help would be hugely appreciated!

5 REPLIES 5
v-kkf-msft
Community Support
Community Support

Hi @tgardner ,

Maybe you can try to visualize the value of the variable, perform debugging, and see how the value of the variable changes with the increase in the number of clicks.

 

Best Regards,
Winniz

Hi Winniz


Thanks for that.

 

Yes that's what I've been doing. When I visualise the variable in the browser environment, it counts up with every click. When I do it embedded in Power BI (only in the data table) it counts up alternately, as described above. Very odd indeed. Absolutely lost.

 

I think it's a glitch.

Hi @tgardner ,

Sorry for the late reply. I created a simple app to display the number of times button builtinnicon:Add was clicked.

image.pngimage.png

When I put it in the app visual of the report, I double-clicked the button, and the number of times became 2.

image.png

I haven't encountered your problem, can you share your formula?

 

Best Regards,
Winniz

Hi,

 

Thanks for your continued support on this!

 

As I said, I have no issue with performing this function with buttons, ONLY with the OnSelect of a datatable column and ONLY embedded within PowerBI (I need both these things to be the case). Hence the specific mystery.

 

Could you try that use case and see if you get the issue and if you have any ideas?

Hi @tgardner ,

The reason for this happening is not in Power BI, but in the design of Power App.

 

I set the Onselect of the Data column to Select(Button3). The button 3 is Set(RunningTotal, RunningTotal + Value(Source.Text)). After saving and publishing, test the number of clicks on the column in the browser, and the results are as follows:

 

app test.gif

I found that a user also encountered this problem. The Post

I suggest you seek the help of Power App professionals.

 

Best Regards,
Winniz

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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