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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to create a Calcul...
Power Apps
Unanswered

How to create a Calculate Column for increment by 1 when Task Number is Same.

(0) ShareShare
ReportReport
Posted on by 258

I have a Task Name , Task Number , Region , State. 

where Task Name is not Unique for example :- 

Task name would be same for 3 to 4 rows

like

 

Task Name :- ABC123    

Task Number :- 1

Region :- XYZ

State: - PQRS

 

Task Name :- ABC123

Task Number :- 2

Region :- XYZ

State: - PQRS

 

Task Name :- ABC123

Task Number :- 3

Region :- XYZ

State: - PQRS

 

Now as you can see the only Task Number is changing not all the column. some time Region or state must be different but Task Number is change when Task Name is added again n again.

 

I have a form where i have to form formula on Task number How would i do that.

 

 

 

 

 

Categories:
I have the same question (0)
  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    Hi @B8,

     

    Try using the following formula,

     

    First(SortByColumns(Filter(DataSource, TaskNameColumnName = TaskDataCardValueName.Text), TaskNumberColumnName , SortOrder.Descending)).TaskNumberColumnName + 1

     

    If you found my answer helpful, please consider giving it a thumbs-up or a like. Your feedback is greatly appreciated!

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

  • B8 Profile Picture
    258 on at

    In the form I had changes the DATACARDVALUE into TEXTINPUT and with the help of collection i am directly prepopulating Task Name.

     

    so when i trying your formula  TASKNAMECOLUMNNAME = TEXTINPUT21.TEXT its showing error : "Invalid argument type. cannot use text value in this context "

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    What is the type of TASKNAMECOLUMNNAME  column?

  • B8 Profile Picture
    258 on at

    Choice column

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    Hi @B8,

     

    If it is a choice column then try using the following formula.

     

    First(SortByColumns(Filter(AddColumns(DataSource, "TaskColumnNewName", Concat(Choices(TaskColumnName), Value, "")), TaskColumnNewName = TaskDataCardValueName.Text), TaskNumberColumnName , SortOrder.Descending)).TaskNumberColumnName + 1

     

    If you found my answer helpful, please consider giving it a thumbs-up or a like. Your feedback is greatly appreciated!

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

  • B8 Profile Picture
    258 on at

    B8_0-1693477171648.png

     

    I am getting this error

  • Talha_Dar Profile Picture
    870 Super User 2024 Season 1 on at

    Hi @B8,

     

    You don't need to include the data source name in the Choices function, just use the column name.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard