DEV Community

Kinga
Kinga

Posted on • Edited on

Power Apps License calculator

It's not all that easy to "get a feeling" about the license cost for Power Apps.
Even if we consider that Per User is 4 times the price of Per App (per user/per app) and pay-as-you-go(per active user/per app) is half the price of Per User, I cannot easily foresee how the total license cost will develop, and what would be the best option under different circumstances.

My Power Apps License Calculator sample, published only yesterday, provides a visual representation of the cost:
license price
and the best license type for different usage scenarios:
license type

The sample consists of a reusable component, and a Canvas App. After importing the solution, you may embed the component in your own application, and configure it with your own Volume Licensing prices.

How to configure the component

The license cost per user, the currency and the initial percentage of the active users are all accessible via component's Custom properties. "Show info" toggle allows you to decide if you want to display the "legend"- the information about acronyms used when multiple license types result in the same price.

Custom properties

And anything more advanced?

In case you'd like to display different amount of apps and users, edit the component's onReset:



ClearCollect(
    colUsers,
    Table(
        {userCount: 1},
        {userCount: 10},
         //...
        {userCount: 5000}
    )
);
ClearCollect(
    colApps,
    Table(
        {appCount: 1},
        {appCount: 2},
        {appCount: 3},
        {appCount: 4},
        //...
        {appCount: 3000},
        {appCount: 5000}
    )
);


Enter fullscreen mode Exit fullscreen mode

The matrix source is automatically recalculated based on these two collections, and the license cost component parameters.
There are some additional columns in colLicenses, currently not used in the control. Perhaps you want to use them to display additional information when user hovers over the cell?
This is also the place where you can change the cell colors, in case the current theme is not your cup of tea.



ForAll(
    colApps ,
    ForAll(
        colUsers,
        Collect(
            colLicenses,
            //...
             {
                        Type: If(CountRows(matches)>1,Concat(matches,Left(type,1),"/"),First(matches).type) ,
                        Price: First(matches).price,
            //...
            }


Enter fullscreen mode Exit fullscreen mode

The resulting colLicenses collection is provided as a gallery source:

configuration

In order to display it in a matrix format, I'm setting wrap parameter of the gallery to the length of the users' collection.
In case you decide to change the colUsers, make sure that this setting is updated if necessary.

Such a simple solution to such a complicated problem. =)

UPDATE 2024.09.15

I'm aware there's an issue with "division by 0" error when setting number of active users to zero =). I will soon make an update to the sample, but in the meantime for those who don't want to wait:+

"License Calculator Components Library" Component

Open the component in edit mode, and change the calculation in onReset below the Set(maxLicensePrice, ... formula:



//...

Clear(colLicenses);
ForAll(
    colApps ,
    ForAll(
        colUsers,
        Collect(
            colLicenses,
            With(
                {
                    license: SortByColumns(
                        Table(
                            {
                                type: "User",
                                price: userCount * compLicenseCalculator.LicensePerUser
                            },
                            {
                                type: "App",
                                price: appCount * userCount * compLicenseCalculator.LicensePerApp
                            },
                            {
                                type: "PAYG",
                                price: appCount * compLicenseCalculator.LicensePAYG * RoundUp(userCount * slActiveUsersPerc.Value / 100,0)
                            }
                        ),
                        "price"
                    )
                },
                With(
                    {
                        matches: Filter(license,price = Min(license,Value(price)))
                    },
                    {
                        Type: If(CountRows(matches)>1,Concat(matches,Left(type,1),"/"),First(matches).type) ,
                        Price: First(matches).price,
                        countrows:CountRows(matches),
                        Color: If( CountRows(matches)=1,
                                Switch( 
                                    First(matches).type,
                                    "User",ColorValue("#EBE7E8"),
                                    "App",ColorValue("#E7E2DA"),
                                    "payg",ColorValue("#E7E8E7")
                                    ),
                                ColorValue("#FFFFFF")
                               ),
                        Opacity:If(maxLicensePrice=0,0, First(matches).price/maxLicensePrice),
                        ColorHeatmap:If(maxLicensePrice=0,RGBA( 227, 214, 209,0), RGBA( 227, 214, 209, Round( First(matches).price/maxLicensePrice,2))),

                        perUser: userCount * compLicenseCalculator.LicensePerUser,
                        perApp: appCount * userCount * compLicenseCalculator.LicensePerApp,
                        payg: appCount * compLicenseCalculator.LicensePAYG * RoundUp(userCount * slActiveUsersPerc.Value / 100,0),
                        userCount: userCount,
                        activeUsers: RoundUp(userCount * slActiveUsersPerc.Value / 100,0),
                        appCount: appCount
                    }
                )
            )
        )
    )
);




Enter fullscreen mode Exit fullscreen mode

Top comments (5)

Collapse
 
jaloplo profile image
Jaime López

Great article!!!

Power Platform licenses are a nightmare or, at least, they were some months ago. I'm a bit off right now but remember to download the Power Platform licensing paper and, sometimes, it made more noise than solved the problem.

Great app to make life easir for the decission makers.

Collapse
 
jpdosher profile image
Jean-Paul Dosher

Did u update it? By the way, great tools!

Collapse
 
kkazala profile image
Kinga

@jpdosher If I updated it, meaning I should update it? ;)
I noticed there was a division by 0 error, I already fixed it but I have to make a PR. I pasted the code above.
Is there anything else that I'm not aware of?

Collapse
 
jpdosher profile image
Jean-Paul Dosher

Wow, I really, really sorry about the lack of context!
I meant the licensing and pricing update, but that is user/maker response

Thread Thread
 
kkazala profile image
Kinga

:D :D :D No worries, happens to the best of us :D
I cannot find any info regarding price changes, are you referring to the Power Apps Premium (with 2,000-seat minimum) that is 12$? In this case you are right, it's enough you update the prices in the component parameters.
I see "per app" is not displayed on the Power Apps plans page but it's still there in the Licensing Guide and I found some threads saying that MS confirmed it's not going away.

Do you have any more information? I'd be happy to update the post