web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Turn numeric to text w...
Power Apps
Unanswered

Turn numeric to text with Filter

(0) ShareShare
ReportReport
Posted on by 45

I have this function:

ClearCollect(
 colCWTest,
 {Result: "All"},
 Filter(
 KPI_ServiceDesk,
 Year = dd_year.Selected.Result).Text(CW)
 )
)

The Filter of course does not work with .Text(CW). Only when I do .CW (without Text). But how am I able to get CW (which is numeric column inside a list) converted to a text?

 

I also tried

ClearCollect(
 colCWTest,
 {Result: "All"},
 Text(Filter(
 KPI_ServiceDesk,
 Year = dd_year.Selected.Result).CW)
 )
)

but that does not work either.

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @TKEnes 

    It appears that you are trying to add an "All" option to a list of filtered choices.  If so, then your formula is not matching the record schemas properly.  You would have ended up with a collection with a Result column that would have a value for the first record and then the remaining records having values in a CW column.

     

    Not sure of your purpose for the collection, but if you are using this for a dropdown or other items property of a control, then you can change your formula to the following:

    Ungroup(
     Table(
     {Items: ["All"]},
     {Items: RenameColumns(Filter(KPI_ServiceDesk, Year = dd_year.Selected.Result).CW, "CW", "Value")}
     ),
     "Items"
    )

     

    You really don't need to worry about the conversion to text as it will all result in text anyway, but if you do specifically want to convert, then change the formula to the following:

    Ungroup(
     Table(
     {Items: ["All"]},
     {Items: ForAll(Filter(KPI_ServiceDesk, Year = dd_year.Selected.Result).CW, Text(CW)) }
     ),
     "Items"
    )

    NOTE: the above formulas will produce a table with single column records.  The column name will be Value.

     

    If there is some need to duplicate all this data in your app memory into a collection, then just use either of the formulas above in a ClearCollect function.

    Ex:

        ClearCollect(colCWTest, <eitherFormulaAbove>)

     

    But again, if this is for some Items property, then you need not waste the effort on making a collection...it's just overhead!

     

    I hope this is helpful for you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard