New to Power* suite of products. Have 2 general questions about PowerApps.
1. In Excel, MODE is a function that finds the most occurring record in a data set. I can't seem to find the equivalent syntax in PowerApps. Anyone know what it is? If there isn't an equivalent formula (yet), what is the workaround? I have created the measure in PBI and it carries over to PAPPS through the integration connection, but I cannot display it correctly because the default gallery is list, which leads me to my second question.
2. When I create a normal gallery or any other labels, text, etc. to try and display the custom PBI measure, how do I connect it using the pbiintegration connection? It doesn't show up as data source to select (maybe that's now its suppose to work).
Thanks for helping someone new to the programs. There's lots to learn.
Solved! Go to Solution.
Here's my revised answer. This works with text.
First(
Sort(
AddColumns(AddColumns(YourDataSource,"MatchName","MATCH"&YourDataColumn),
"ModeNumber",
CountRows(Filter(YourDataSource,"MATCH"&YourDataColumn=MatchName))),
ModeNumber,Descending)
).YourDataColumn
---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.
**Retracting my answer, found a bug in the code. Looking into it now.
Thanks for the quick response. Will this work with text or numbers datatype in the record? The record I'm looking to display is a text datatype.
Here's my revised answer. This works with text.
First(
Sort(
AddColumns(AddColumns(YourDataSource,"MatchName","MATCH"&YourDataColumn),
"ModeNumber",
CountRows(Filter(YourDataSource,"MATCH"&YourDataColumn=MatchName))),
ModeNumber,Descending)
).YourDataColumn
---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.
Dumb question but in your formula, I only need to replace YourDataSource and YourDataColumn correct?
I'll test it at work tomorrow and let you know if it works. Thanks again the for quick response. Definitely will give Thumbs Up if this works.
Yes, that's correct! Let me know if you run into any issues with it.
OK had a chance to test the script. Ran into 2 issues:
1. The powerbiintegration data source handle is problematic. With your code it produced a different outcome than the definition. Coupled with other issues (connection & refresh reliability, other instability), I abandoned the whole PowerBI and PowerApp integration connector. Its very buggy for a regular user like me and since I don't have a premium plan, other PBI linkage solutions are not available.
2. Small issue with your code. The ending .Name will show "MATCH" in front of every result. So I replaced it with the name of the record that I want to show, and bam, it works!
First( Sort(
AddColumns(AddColumns(YourDataSource,"MatchName","MATCH"&YourDataColumn),
"ModeNumber",
CountRows(Filter(YourDataSource,"MATCH"&YourDataColumn=MatchName))),
ModeNumber,Descending)
).YourDataColumn
So the solution works, albeit with some caveats. Thanks again for your help and quick response!
User | Count |
---|---|
251 | |
102 | |
94 | |
47 | |
37 |