Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
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.
Hi @Anonymous ,
Is this the result you want?
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
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 33 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 126 | |
| 115 | |
| 85 | |
| 69 | |
| 69 |