cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
adavid
Regular Visitor

Powerapps if else currency percent

I have this as a text to a Label and it works with just text-

If(ThisItem.'Goal Table'=1,If("WDA"=Gallery2.Selected.Value,Sum(Filter(Goalscommon,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(Goalscommon,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(Goalscommon,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(Goalscommon,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=2,If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoals,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(SelectGoals,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoals,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(SelectGoals,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=3,If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoalPercent,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(SelectGoalPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoalPercent,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(SelectGoalPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=4,If("WDA"=Gallery2.Selected.Value,Sum(Filter(Specialmeasures,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(Specialmeasures,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(Specialmeasures,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(Specialmeasures,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=5,If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalCommonPercent,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(GoalCommonPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalCommonPercent,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(GoalCommonPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=6,If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalsDollar,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(GoalsDollar,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalsDollar,TabName=LabelTabName.Text),OctActualDEN)),Sum(Filter(GoalsDollar,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)))))))

 

Now I would like to format the results depending on what number the 'Goal Table' is.. like if it's 4 I want the results to show in %. If it's 6 I want it to show as currency. I've tried adding currency but it isn't working for me. The NUM is still showing results but not as currency and the DEN disappears altogether.

 

If(ThisItem.'Goal Table'=1,If("WDA"=Gallery2.Selected.Value,Sum(Filter(Goalscommon,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(Goalscommon,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(Goalscommon,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(Goalscommon,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=2,If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoals,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(SelectGoals,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoals,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(SelectGoals,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=3,If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoalPercent,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(SelectGoalPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(SelectGoalPercent,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(SelectGoalPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=4,If("WDA"=Gallery2.Selected.Value,Sum(Filter(Specialmeasures,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(Specialmeasures,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(Specialmeasures,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(Specialmeasures,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=5,If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalCommonPercent,TabName=LabelTabName.Text),OctActualNUM),Sum(Filter(GoalCommonPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualNUM))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalCommonPercent,TabName=LabelTabName.Text),OctActualDEN),Sum(Filter(GoalCommonPercent,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),OctActualDEN)),If(ThisItem.'Goal Table'=6,If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalsDollar,TabName=LabelTabName.Text),"$"&Text(OctActualNUM,"[$-en-US]0.00")),Sum(Filter(GoalsDollar,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),"$"&Text(OctActualNUM,"[$-en-US]0.00")))&" / "&If("WDA"=Gallery2.Selected.Value,Sum(Filter(GoalsDollar,TabName=LabelTabName.Text),"$"&Text(OctActualDEN,"[$-en-US]0.00"))),Sum(Filter(GoalsDollar,Office=Gallery2.Selected.Value && TabName=LabelTabName.Text),"$"&Text(OctActualDEN,"[$-en-US]0.00")))))))) 

 

Any suggestions?

 

0 REPLIES 0

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,110)