Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Calculation of ARR

Hey guys,


How could I calculate the ARR value from the previous year to the current year?

For example, we are in the year 2022, so the ARR would be for the year 2021. I made a measurement, but I'm not sure it's correct. Because through this ARR measure, I want to count how many franchise had an ARR greater than 1 million.

ARR =
VAR Acumulado = CALCULATE(
[Faturamento],
FILTER(
ALL('dCalendário'),
'dCalendário'[Ano] <= MAX('dCalendário'[Ano])))

VAR AcumuladoPerdido = CALCULATE(
[Faturamento Perdido],
FILTER(
ALL(
'dCalendário'),
'dCalendário'[Ano] <= MAX('dCalendário'[Ano])))

return
Acumulado - AcumuladoPerdido
 
The first variable calculates the accumulated fee and the second calculates the accumulated fee from lost customers, then I subtract the accumulated fee from the lost one.
 
So, the final result would be: ARR value of the previous year per Franchisee (dFranqueados table). The Fee Amount to calculate the accumulated amount is in the dClientes table.
 
kfreitass_0-1649820893232.png

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Anonymous,

You can try to use the following measure formula if it helps:

ARR =
VAR currDate =
    MAX ( 'dCalendário'[Ano] )
VAR prevDate =
    DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
VAR Acumulado =
    CALCULATE (
        [Faturamento],
        FILTER ( ALLSELECTED ( 'Fact' ), 'Fact'[Ano] <= currDate )
    )
VAR AcumuladoPerdido =
    CALCULATE (
        [Faturamento],
        FILTER ( ALLSELECTED ( 'Fact' ), 'Fact'[Ano] <= prevDate )
    )
RETURN
    Acumulado - AcumuladoPerdido

Notice: you can replace the 'fact' table to the table which your formula calculated.

In addition, I'd like to suggest you take a look at the power bi star schema relationship to optimize your table mappings.

Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Anonymous,

You can try to use the following measure formula if it helps:

ARR =
VAR currDate =
    MAX ( 'dCalendário'[Ano] )
VAR prevDate =
    DATE ( YEAR ( currDate ) - 1, MONTH ( currDate ), DAY ( currDate ) )
VAR Acumulado =
    CALCULATE (
        [Faturamento],
        FILTER ( ALLSELECTED ( 'Fact' ), 'Fact'[Ano] <= currDate )
    )
VAR AcumuladoPerdido =
    CALCULATE (
        [Faturamento],
        FILTER ( ALLSELECTED ( 'Fact' ), 'Fact'[Ano] <= prevDate )
    )
RETURN
    Acumulado - AcumuladoPerdido

Notice: you can replace the 'fact' table to the table which your formula calculated.

In addition, I'd like to suggest you take a look at the power bi star schema relationship to optimize your table mappings.

Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

@v-shex-msft Its working.

Thank you

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.