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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX help

I have placed a card in the dashboard where using average value. The value in the card displaying good when filetered on single value of year ,however it's showing different value when selecting 'ALL' . Seems like the average taking overall projects.

 

Year 2019 - Average -100% -Ok

Year 2020- Average -100% - Ok

Year All - Average -1157% -Not Ok ( it should show only 100%). How to filtered out the unselected values while calcuating the average value.

 

AverageProjectYear
100%Project A2019
100%Project A2020
100%Project A2021
1157%  

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Try the following formula:

 

Measure = 
IF(
    ISFILTERED('Table'[Year]),
    [Average],
    AVERAGEX(
        ALLSELECTED('Table'[Year]),
        [Average]
    )
)

image.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

3 REPLIES 3
partymia
Frequent Visitor

you can put i guess in the filter to deselect the blanks projects or years if this is what is causing the problem. Are you using a simple average formula, maybe you need to use one that is filtering the data based on a grouping?

Anonymous
Not applicable

Am using divide function to calucate the average formula.

Hi @Anonymous ,

 

Try the following formula:

 

Measure = 
IF(
    ISFILTERED('Table'[Year]),
    [Average],
    AVERAGEX(
        ALLSELECTED('Table'[Year]),
        [Average]
    )
)

image.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.