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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

Reply
saud968
Super User
Super User

Incorrect average

AGE 70 27 25 9 4 4 2 9 7 2 0 3 2 0 0 13 0 3 0 6 0 1 6 4 15 4 6 13 5 3 11 3 4 2 0 0 1 2 2 1 2 5 0 1 4 5 4 4 3 3 3 4 1 2 1 2 1 7 1 0 1 8 0 5 0 7 6 4 1 3 1
In Excel the average for this is 5.04, however, same age in Powerbi using the below DAX the average we are getting is 10 how do we fix the Dax, both tables do not have the same columns so the union does not work. I tried. 
TTR2 = CALCULATE( AVERAGEX( 'support__cw_ops_manage_case_merge_temp', 'support__cw_ops_manage_case_merge_temp'[AGE] ) + AVERAGEX( 'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS', 'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS'[AGE_IN_DAY] ) )

Please help @amitchandak @Idrissshatila @Ritaf1983 @Fowmy @Ahmedx @lbendlin @Daniel29195 

1 ACCEPTED SOLUTION

Thank you for reviewing it. I was able to get the correct average with the below dax

TTR2 =
VAR AvgAge1 =
    AVERAGEX (
        FILTER (
            'support__cw_ops_manage_case_merge_temp',
            'support__cw_ops_manage_case_merge_temp'[ClosedCaseFlag] = TRUE ()
        ),
        'support__cw_ops_manage_case_merge_temp'[AGE]
    )
VAR AvgAge2 =
    AVERAGEX (
        FILTER (
            'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS',
            'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS'[ClosedCaseFlag] = TRUE ()
        ),
        'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS'[AGE_IN_DAY]
    )
RETURN
    AvgAge1 + AvgAge2

View solution in original post

2 REPLIES 2
HotChilli
Super User
Super User

How does the DAX shown relate to the data you have posted?

--

The DAX refers to 2 tables and, it looks to me, that the CALCULATE is redundant and then 2 averages are getting added together. 

So, if the average of each table's value is around 5, adding them together will give 10.  That may explain why you get 10 but I'm still confused about the data and the dax shown.

Thank you for reviewing it. I was able to get the correct average with the below dax

TTR2 =
VAR AvgAge1 =
    AVERAGEX (
        FILTER (
            'support__cw_ops_manage_case_merge_temp',
            'support__cw_ops_manage_case_merge_temp'[ClosedCaseFlag] = TRUE ()
        ),
        'support__cw_ops_manage_case_merge_temp'[AGE]
    )
VAR AvgAge2 =
    AVERAGEX (
        FILTER (
            'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS',
            'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS'[ClosedCaseFlag] = TRUE ()
        ),
        'SUPPORT__CW_OPS_VOLUME_FRESHDESK_FORTIFY_SPS'[AGE_IN_DAY]
    )
RETURN
    AvgAge1 + AvgAge2

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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