cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Averages not updating when Visualization Filter applied

Hello there,

 

I have the folloing calculation for MeanDays:

 

MeanDays =
format(INT((average('Property and Admin Unit'[nDays])) / 365), "000") & " Years " &
format(INT(divide(Mod((average('Property and Admin Unit'[nDays])), 365),30)), "00") & " Months " &
format(INT(mod(mod((average('Property and Admin Unit'[nDays])), 365), 30)), "00") & " Days"
/* Converts average nDays into XXX Years XX Months XX Days */

 

When I apply Visualization filters the Average does not change ...

It seems to calculate the average on the entire dataset not what is being filtered...

 

Am I missing something?

 

The graphs update on selection of Business Area but the average remain the same?The graphs update on selection of Business Area but the average remain the same?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Averages not updating when Visualization Filter applied

Hi @AliceInChains,

I haven't see the meandays measure in your screenshot, please add ALLSELECTED(Table) in your formula to create a measure rather than calculated column and check if it works fine.

MeanDays =
FORMAT (
    INT (
        (
            AVERAGEX (
                ALLSELECTED ( 'Property and Admin Unit' ),
                'Property and Admin Unit'[nDays]
            )
        )
            / 365
    ),
    "000"
)
    & " Years "
    & FORMAT (
        INT (
            DIVIDE (
                MOD (
                    (
                        AVERAGEX (
                            ALLSELECTED ( 'Property and Admin Unit' ),
                            'Property and Admin Unit'[nDays]
                        )
                    ),
                    365
                ),
                30
            )
        ),
        "00"
    )
    & " Months "
    & FORMAT (
        INT (
            MOD (
                MOD (
                    (
                        AVERAGEX (
                            ALLSELECTED ( 'Property and Admin Unit' ),
                            'Property and Admin Unit'[nDays]
                        )
                    ),
                    365
                ),
                30
            )
        ),
        "00"
    )
    & " Days"


Please respond to us if you have any other issue.

Best Regards,
Angelia


View solution in original post

3 REPLIES 3
Highlighted
Microsoft
Microsoft

Re: Averages not updating when Visualization Filter applied

Hi @AliceInChains,

I haven't see the meandays measure in your screenshot, please add ALLSELECTED(Table) in your formula to create a measure rather than calculated column and check if it works fine.

MeanDays =
FORMAT (
    INT (
        (
            AVERAGEX (
                ALLSELECTED ( 'Property and Admin Unit' ),
                'Property and Admin Unit'[nDays]
            )
        )
            / 365
    ),
    "000"
)
    & " Years "
    & FORMAT (
        INT (
            DIVIDE (
                MOD (
                    (
                        AVERAGEX (
                            ALLSELECTED ( 'Property and Admin Unit' ),
                            'Property and Admin Unit'[nDays]
                        )
                    ),
                    365
                ),
                30
            )
        ),
        "00"
    )
    & " Months "
    & FORMAT (
        INT (
            MOD (
                MOD (
                    (
                        AVERAGEX (
                            ALLSELECTED ( 'Property and Admin Unit' ),
                            'Property and Admin Unit'[nDays]
                        )
                    ),
                    365
                ),
                30
            )
        ),
        "00"
    )
    & " Days"


Please respond to us if you have any other issue.

Best Regards,
Angelia


View solution in original post

Highlighted
Frequent Visitor

Re: Averages not updating when Visualization Filter applied

Thanks but it did not work... Meandays is labeled "Average Tenancy" The same is happening for "Median Tenancy", "Maximum Tenancy"  and "Minimum Tenancy"....

 

Not sure why?

 

another quick question though .. is there a quick way to convert Calculated Coloumn to Measure?

Highlighted
Frequent Visitor

Re: Averages not updating when Visualization Filter applied

It worked... I had to convert the calculated columns into measures by completely re-constructing the claculation... Its a pitty that you can not simply convert the calculated column into a measure ...... 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors