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

Contextualization of a filter parameter

Hi all

 

I have been posting but it remain unsolved (SO I am re editing message & title)

 

In a page I am struggling with creating a contextualization in the formulas of the entire page

My overall attempt : contextualize depending on the business name that appear on an item somewhere in the page 

 

Seems simple ? yes but so far I never found the right approach

 

The initial formula (that is working well 

JeanFred_0-1630666298017.png

 

 )

 

Text(
Sum(
Filter(
'PROJECTDB';
BUSINESS1>= 1);
(BHWQ1+BSWQ1+BINQ1+BEXQ1+BHWQ2+BSWQ2+BINQ2+BEXQ2+BHWQ3+BSWQ3+BINQ3+BEXQ3+BHWQ4+BSWQ4+BINQ4+BEXQ4)*BUSINESS1/100)
/1000;"[$-en-us]#,##")

 

So: I am creating an Item called BUSINESSNAME and for this page the value is BUSINESS1 and I am trying this formula 

 

Text(
Sum(
Filter(
'PROJECTDB';
Value(BUSINESSNAME.Text) >= 1);
(BHWQ1+BSWQ1+BINQ1+BEXQ1+BHWQ2+BSWQ2+BINQ2+BEXQ2+BHWQ3+BSWQ3+BINQ3+BEXQ3+BHWQ4+BSWQ4+BINQ4+BEXQ4)*Value(BUSINESSNAME.Text)/100)
/1000;"[$-en-us]#,##")

 

or this formula :

Text(
Sum(
Filter(
'PROJECTDB';
BUSINESSNAME.Text >= 1);
(BHWQ1+BSWQ1+BINQ1+BEXQ1+BHWQ2+BSWQ2+BINQ2+BEXQ2+BHWQ3+BSWQ3+BINQ3+BEXQ3+BHWQ4+BSWQ4+BINQ4+BEXQ4)*ValueBUSINESSNAME.Text/100)
/1000;"[$-en-us]#,##")

 

always the same results : no results (empty Item) Instead of properly proceeding the calculation - I know that the 1st way to proceed should work ! but it does not work (probably due to the other elements of the formula)

 

Any Idea? I am REALLY Struggling with it ! 

JeanFred_1-1630666298103.png

 

 

Many thanks

BR

Jean fred

3 REPLIES 3
shoog
Super User
Super User

Label1 is the entire object. If you want to read the text property of the label, you have to use Label1.Text

zmansuri
Super User
Super User

Text(
Sum(
Filter(
'DBNAME';
Value(Label1.Text)>=0);(BHWQ1+BSWQ1+BINQ1+BEXQ1+BHWQ2+BSWQ2+BINQ2+BEXQ2+BHWQ3+BSWQ3+BINQ3+BEXQ3+BHWQ4+BSWQ4+BINQ4+BEXQ4)*BUSINESSNAME/100)
/1000;"[$-en-us]#,##")

JeanFred
Frequent Visitor

Thank yu for the kind support

 

unfortunatelly when applying it it does not work (both solution show an empty item instead of the expected result 😞

Helpful resources

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

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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