cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LarryLurex
Level: Powered On

Groupby function: works in studio, but not on device

Hi,

 

I think Azure SQL is struggling to locate ghost columns that are created by the Groupby function.

 

I came up with a way to summarise a periodic sales report by grouping customer's sales volume in a new column titled "ItemByCustomer" with the following code:

 

SortByColumns(
    AddColumns(
        GroupBy(
            Filter(
                '[dbo].[TableMaster]',
                Tarikh >= DateFrom.SelectedDate,
                Tarikh <= DateTo.SelectedDate,
                Tier <> "Dealer0" && Tier <> "Dealer1" && Tier <> "Dealer2",
                Item = Text(Radio1_1.Selected.Value),
                Value(OUT_Isi) > 0
            ),
            "Customer",
            "ItemByCustomer"
        ),
        "Item sales",
        Sum(
            ItemByCustomer,
            Value(OUT_Isi)
        )
    ),
    "Item sales",
    Descending
)

The summary tabulation works fine in studio, either in gallery or table format:ScreenHunter 364.jpg

 

However, when I open the app on my ipad, I get these error messages:IMG_0886.JPG

 

 

 

Can anyone advise me if this is an Azure SQL issue, iPad incompatibility, or something is not right with my code?

 

Thanks a bunch,

LarryLurex

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Groupby function: works in studio, but not on device

Hi @LarryLurex,

Based on the formula that you provided, I don't find any syntax error with it.

The user @Lazzaras has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/The-column-Value-of-the-table-wasn-t-found/td...

I think this issue may be related to the known issue when connecing to SQL table data source from an app. More details about the known issue, please check the following link:

https://powerapps.microsoft.com/en-us/support/ 

As an fixed solution, please consider take a try to disable/turn off the "Explicit column selection" option within Advanced settings of App Settings of your app, then re-publish your app, check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
KroonOfficeSol
Level 10

Re: Groupby function: works in studio, but not on device

@LarryLurex

 

I ques the error occurs in the AddColumns Sum part. First try to run your script without this part and see if it works then. Let us know.

 

For this part

Tier <> "Dealer0" && Tier <> "Dealer1" && Tier <> "Dealer2",

You could also do this (I think)

!(Tier in ["Dealer0", "Dealer1","Dealer2"])

Paul

 

Community Support Team
Community Support Team

Re: Groupby function: works in studio, but not on device

Hi @LarryLurex,

Based on the formula that you provided, I don't find any syntax error with it.

The user @Lazzaras has faced similar issue with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/General-Discussion/The-column-Value-of-the-table-wasn-t-found/td...

I think this issue may be related to the known issue when connecing to SQL table data source from an app. More details about the known issue, please check the following link:

https://powerapps.microsoft.com/en-us/support/ 

As an fixed solution, please consider take a try to disable/turn off the "Explicit column selection" option within Advanced settings of App Settings of your app, then re-publish your app, check if the issue is solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LarryLurex
Level: Powered On

Re: Groupby function: works in studio, but not on device

@v-xida-msft, you such are a scholar and a gentleman.

 

Disable/turning off the "Explicit column selection"seems to be a panacea to a lot of problems. Should I worry, and is there anything that I have to look out for if explicit column selection is turned off?