Hallo Leute,
Ich bin neu in dem Thema Power Apps und komme an einem Punkt nicht weiter.
Ich habe zwei Dropdown in denen man etwas auswählen kann, dazu zu jedem noch mal ein Dropdown das in Abhängigkeit
zu dem daneben steht und die Nummer zu dem Wert daneben anzeigt.
Das Grün umrandete ist später sichtbar.
Das Rot umrandete ist nachher ausgeblendet und nur zum Vergleichen gedacht.
Nun möchte ich die zwei Zahlen in den Roten Dropdown vergleichen.
Ich hätte gerne, dass wenn die obere Zahl größer ist eine 1 steht und umgekehrt eine 2.
In was für einem Feld die zwei Zahlen dann stehen ist mir egal. Ich muss sie nur nachher wieder für eine
Formel, die schon funktioniert hat, wiederverwenden können.
Ich habe es mit einem Beschriftungsfeld probiert und diese Formel genommen.
If(Dropdown_1 > Dropdown_2; 1)
Leider funktioniert es nicht. Auch mit .Value dahinter geht es nicht.
Die Formel erwartet immer eine Zahl.
In der Tabelle die ich als Element für die Dropdowns genommen habe, ist die Spalte als Zahl Formatiert.
Ich glaube ich muss die zwei Dropdowns mit den zahlen irgendwie als Zahl formatieren.
Leider habe ich keine Ahnung wie und ob das überhaupt funktioniert.
Hätte Jemand vielleicht eine Lösung für mein Problem?
Danke im Vorhinein
CherryKing
Solved! Go to Solution.
Hi @CherryKing ,
I think I know where the problem is.
Please use 'Nummer' instead of 'Number'.
If(Value(Dropdown1.Selected.Nummer)>Value(Dropdown2.Selected.Nummer),1)
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @CherryKing ,
According to your description, I've made a test for your reference:
1\ Add a dropdown control 'Dropdown1' and set its Items property to:
["1","2","3"]
2\ Add a dropdown control 'Dropdown2' and set its Items property to:
["1","2","3"]
3\ Add a label control and set its Text property to:
If(Value( Dropdown1.Selected.Value)> Value(Dropdown2.Selected.Value),1)
4\ The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Thanks for your answer.
I think there is a language problem?
I have the top two dropdown dependent on each other.
The bottom two exactly the same. If I change something on the left side, the number on the right changes automatically.
So on my Item property there is the code for the dependence?
Where should I enter ["1", "2", "3"] ?
Best Regards,
CherryKing
Hi @CherryKing ,
This is just an example.
You could try to use the formula directly:
If(Value( Dropdown1.Selected.Value)> Value(Dropdown2.Selected.Value),1)
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi @v-xiaochen-msft ,
I tried.
I entered the formula and replaced "Dropdown1" and "Dropdown2" with my dropdowns.
I still have an error:
The "Value" function has invalid arguments.
Best Regards,
CherryKing
Hi
Here are my formulas:
Best Regards
Hi @CherryKing ,
According to your description, I've made a test for your reference:
1\ This is my hypothetical list ‘Stationen’. ‘Stationen’ is a Single line of text column. ‘Number’ is a number column.
2\ Add a label control and set its Text property to:
If(Dropdown1.Selected.Number>Dropdown2.Selected.Number,1)
You alos could try this formula:
If(Value(Dropdown1.Selected.Number)>Value(Dropdown2.Selected.Number),1)
3\ The result is as follows:
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
Hi
thanks for the answer, unfortunately it didn't work.
Where did you enter the data on your first picture?
I imported an Excel and used it.
User | Count |
---|---|
126 | |
87 | |
85 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |