web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Complex solution, read...
Power Apps
Unanswered

Complex solution, read for details (Pro needed)

(0) ShareShare
ReportReport
Posted on by 160

Here's the scenario:
A dataverse table named "KORE_Kostenstellens" lists all existing cost centers in the rows. A choice column with the respective selection options (m², NumberOfEmployees, Workhours,... ) is stored as attribute or measurand. This is to determine which measure is used for the apportionment of the cost center. In addition, a separate column is defined for each existing measurement type, where the value of the measurement type for this cost center is stored. A cost center can have several measurands, but depending on which measurand is specified in the Choice column, the respective measurand column is to be accessed later. This is how it looks like (The very left column is the number of the cost center):

 

 

wshalex123_0-1684225592722.png

 

 

The goal is to allocate one cost center to another. A cost center can be allocated to one or to several cost centers. It must remain variable for the end user to which cost centers the cost center is apportioned. For this purpose, I have created additional columns where the number of the cost centers to be allocated is entered (U1, U2, U3,...).

 

 

wshalex123_2-1684225971729.png

 

 

From a mathematical point of view, the cost center to which the cost center is allocated must be calculated in this way:
Definitions:
- Cost center from which the apportionment is made: Sender cost center
- Cost center to which the apportionment is made: Receiver cost center

("€ of Sender cost Center" / "value of the measurement depending on the selected measurement type") * measurement of the receiver cost center depending on the selected measurement type of the Sender cost center".

 

How do I implement this in Power Apps in this scenario?

 

I already got the formula to get the correct Measurement of the sender cost center depending on the selected measurement type in the choice column and divided the €value of the sender cost center through it (works):

LookUp(
 KORE_Betriebsabrechnung_Summe,
 IsBlank(K020) = false,
 K020
 ) / LookUp(
 KORE_Kostenstellens,
 Kostenstellennummer = 1,
 Switch(
 Messgröße,
 Messgrößen.'m²',
 'm²',
 Messgrößen.Personal,
 Personal,
 Messgrößen.Betriebsstunden,
 Betriebsstunden,
 Messgrößen.Büge,
 Büge,
 Messgrößen.Gehänge,
 Gehänge
 )

 

... in this code, KORE_Betriebsabrechnung_Summe is the source of the € value of all cost centers. The values "KXXX" are the numbers of the cost centers in this source).

 

As a solution I could create an additional table where the sender cost centers are columns and the receiver cost centers are rows. Then I would use the ForAll(nonblankrows) formula to retrieve all the receiver cost centers of the sender cost centers, store this somehow as a variable, and then search in the "KORE_CostCenters" table and retrieve the measured variable value stored there. Again, this must be selected based on the selected measurement variable of the sender cost center. I would need this value to multiply the above formula by.

You see the whole thing sounds quite complex and extensive. Maybe someone can help me.

 

Cheers, Alex

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 840 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 332 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 275

Last 30 days Overall leaderboard