cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pkrrs
Frequent Visitor

How to Calculate value from 2 dropdown list and Assign values to another drop down

I was working on a project. And came across a problem I cant solve. I have 2 combo boxes inside an edit form you are allowed to choose one value from each combo box and then a third combo box contains 3 options which is decided by the multiplication of the combo boxA and combo box B .

 

I Tired (DataCardValue9.SelectedItems.Value)*(DataCardValue10.SelectedItems.Value) to just extract the value before the If statements but I get an error as expected number as Value returns table as a data type.

 

DataCardValue9

1

2

3

4

5

 

DataCardValue10

1

2

3

4

5

 

if lets say we selected 2 from DataCardValue9 and 3 from DataCardValue10 i need to get 6 so that i can start the if statement

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @Pkrrs 

 

Try (DataCardValue9.Selected.Value)*(DataCardValue10.Selected.Value) 

 

SelectedItems returns  a table so that will try to multiple two tables in the statement

(DataCardValue9.SelectedItems.Value)*(DataCardValue10.SelectedItems.Value) 

 

Hope it helps,

R

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @Pkrrs ,

Try this

Text(
   Value(DataCardValue9.SelectedItems.Value)*
   Value(DataCardValue10.SelectedItems.Value)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

rubin_boer
Super User
Super User

hi @Pkrrs 

 

Try (DataCardValue9.Selected.Value)*(DataCardValue10.Selected.Value) 

 

SelectedItems returns  a table so that will try to multiple two tables in the statement

(DataCardValue9.SelectedItems.Value)*(DataCardValue10.SelectedItems.Value) 

 

Hope it helps,

R

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

@Pkrrs ,

Sort of a mixture between mine and @rubin_boer 's I think - I missed the SelectedItems, but I think you need Value() around them if those are Text choices.

This Worked thanks!

They weren't text values, Regardless thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,301)