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

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

@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.

Pkrrs
Frequent Visitor

This Worked thanks!

Pkrrs
Frequent Visitor

They weren't text values, Regardless thanks!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,731)