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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Syndicate_Admin
Administrator
Administrator

Bar chart to filter kpi by legend but not by axis

Hello!

I'm brand new to Power BI and I'm trying to create my first sample report.

I have a bar chart showing the top 5 companies by production quantity in 2019 and 2020 and several KPI cards showing YTD vs PYTD by various resources.

Obviously, when I press a company name or bar on a one-year cluster, my KPI changes accordingly. Which I would like to know if I can allow my KPIs to be changed only by company names (Legend) and not by year (Axis) since my KPIs should show only the current year against last year (2021 vs 2020) and not, for example, 2020/2019.

Annotation 2021-03-13 133830.jpg

Thank you in advance!

2 REPLIES 2
v-xiaoyan-msft
Community Support
Community Support

Hi@Syndicate_Admin

 

 Sample data and expected output would help tremendously.
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 

 

Hope it helps.

 

Best Regards,
Caitlyn Yan

 

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

AllisonKennedy
Super User
Super User

You can add a filter to the measures used in the KPI visuals which tells DAX to ignore Year filter. Use ALL(DimDate[Year]) 

 

Not sure what your measures look like, so please share your DAX if you need help. 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.