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

View all the Fabric Data Days sessions on demand. View schedule

Reply
KasperFB
Frequent Visitor

Calculations with table totals

I have these tables in PowerBI which shows the number of tasks created in a year, how long the average completiontime and when they are completed. The count and average is calculated in the visual.

The completiontime for each task is a calculated column in the database.

 

This is dependent on a page filter that lets you filter for the worker, department etc. via 'slicers'.

 

I wish to show the yearly change in percentage for the total of Created, 2y avg and 2y count (how many is completed within 2 years and how fast). E.g. from FY18 to FY19 there is a decrease of 30% in '2y avg'

 

Is there a method that lets you calculate the difference between 2y avg Total for FY18 and FY19 while still filtered ?

 

Any solution, referal to tutorials etc is greatly appreciated 😊

 

KasperFB_0-1655200384398.png

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @KasperFB 

 

Does all data come from the same source table? Do all these 4 table visuals display on the report page at the same time? If so, which filter do you set on each table visual to filter the FY? 

 

If you want to calculate the difference between two yearly totals, you need to use measures. Assume you have a column "FY" with values FY17, FY18, FY19... in the source table, you can use below measure to get the total of created in FY19.

 

Created FY19 =
CALCULATE (
    SUM ( 'Table'[Created Number] ),
    ALLEXCEPT ( 'Table', 'Table'[Worker], 'Table'[Department] ),
    'Table'[FY] = "FY19"
)

 

For the page filters you want to keep, you can add them to ALLEXCEPT function in above measure. You can create similar measures for other FYs. Then create the following measure to calculate the difference percentage. 

 

Created % =
DIVIDE ( [Created FY19] - [Created FY18], [Created FY18] )

 

 

Or you can combine all of them into a measure

 

Created % =
VAR vFY19 =
    CALCULATE (
        SUM ( 'Table'[Created Number] ),
        ALLEXCEPT ( 'Table', 'Table'[Worker], 'Table'[Department] ),
        'Table'[FY] = "FY19"
    )
VAR vFY18 =
    CALCULATE (
        SUM ( 'Table'[Created Number] ),
        ALLEXCEPT ( 'Table', 'Table'[Worker], 'Table'[Department] ),
        'Table'[FY] = "FY18"
    )
RETURN
    DIVIDE ( vFY19 - vFY18, vFY18 )

 

Similarly, you can calculate AVERAGE and COUNT instead of SUM with the same mode. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @KasperFB 

 

Does all data come from the same source table? Do all these 4 table visuals display on the report page at the same time? If so, which filter do you set on each table visual to filter the FY? 

 

If you want to calculate the difference between two yearly totals, you need to use measures. Assume you have a column "FY" with values FY17, FY18, FY19... in the source table, you can use below measure to get the total of created in FY19.

 

Created FY19 =
CALCULATE (
    SUM ( 'Table'[Created Number] ),
    ALLEXCEPT ( 'Table', 'Table'[Worker], 'Table'[Department] ),
    'Table'[FY] = "FY19"
)

 

For the page filters you want to keep, you can add them to ALLEXCEPT function in above measure. You can create similar measures for other FYs. Then create the following measure to calculate the difference percentage. 

 

Created % =
DIVIDE ( [Created FY19] - [Created FY18], [Created FY18] )

 

 

Or you can combine all of them into a measure

 

Created % =
VAR vFY19 =
    CALCULATE (
        SUM ( 'Table'[Created Number] ),
        ALLEXCEPT ( 'Table', 'Table'[Worker], 'Table'[Department] ),
        'Table'[FY] = "FY19"
    )
VAR vFY18 =
    CALCULATE (
        SUM ( 'Table'[Created Number] ),
        ALLEXCEPT ( 'Table', 'Table'[Worker], 'Table'[Department] ),
        'Table'[FY] = "FY18"
    )
RETURN
    DIVIDE ( vFY19 - vFY18, vFY18 )

 

Similarly, you can calculate AVERAGE and COUNT instead of SUM with the same mode. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

 

Thank you very much for your very detailed easy-to-understand explanation 😁 
I've implemented your first solution, which works, and will now try you combined suggestion.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors