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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Conditional Line chart

Hello,

 

I have a trouble to make a measure to calculate average amounts of countries for years in line chart.

When column ID is filtered with a slicer, a measure is needed to visualize the average amonts for countries and years on the line chart.

 

I really need a help

Thanks advance!

 

Screenshot (14).png

This is the line chart when slicer is not filtered.This is the line chart when slicer is not filtered.This is the line chart when slicer is filtered . I need a line chart shown with average amounts of countries over years  when I select ID in slicer.This is the line chart when slicer is filtered . I need a line chart shown with average amounts of countries over years when I select ID in slicer.

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Is this the result you want?

vcgaomsft_0-1649386498160.png

If yes, try this measure.

Average over country = CALCULATE(DIVIDE(SUM('Table'[Amount]),COUNTROWS('Table')),ALLEXCEPT('Table','Table'[Id]))

Attach the PBIX file for reference. Hope it helps.

 

If I misunderstood what you needs, please feel free to tell me the result you want and how to calculate it.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Anonymous
Not applicable

Thank you for your time and reply.

 

The measure you typed is working fine and there is nothing wrong with it. But still the line chart visual doesn't take a form that we need. Actually I even don't know if it is possible to form the line chart visual the way we want. We just want to give it a shot 🙂


Anyway, thank for your reply and suggestion again!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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