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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
Anonymous
Not applicable

Default value in card when two or more months are selected on a filter

Hello everyone! I would like some help with the following situation.

 

I have a filter of months and a card with percentages. When a month is selected, the card works perfectly and shows the percentage for the month.

 

sialmiroma_0-1660764154649.pngsialmiroma_1-1660764166753.png

 

However, when all or more than one month is selected, the card shows the total percentage sum or the sum of the selected months on the percentage card.

 

sialmiroma_2-1660764208224.png

sialmiroma_3-1660764216850.png

 

I would like that only when two or more months are selected, the card shows the average of the percentage column.

 

How can I do this?  Thank you very much in advance! 😊

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

If the percentage is a column from the table, after adding it to the card visual, you can switch the aggregation type to Average by right-clicking on the column in Fields well and select Average. By default it selects Sum. 

vjingzhang_0-1661156804518.png

 

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

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

If the percentage is a column from the table, after adding it to the card visual, you can switch the aggregation type to Average by right-clicking on the column in Fields well and select Average. By default it selects Sum. 

vjingzhang_0-1661156804518.png

 

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

 

Jeanxyz
Power Participant
Power Participant

I would create a measure including var,

 

measure_card=

var month_count=distinctcount(dim_date[yearmonth])

return

if(month_count>1, calculate(average(table[Percentage]), blank())

tamerj1
Community Champion
Community Champion

Hi @Anonymous 

What is the current dax code of the measure?

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.