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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
AnthonyJoseph
Resolver III
Resolver III

Calculate top 2 items based on a condition ( when entity exists in all the selected years)

 Hello Community,

 

I have a table where I have value of few entities. The ask is to display the top 2 items in a bar chart based on the years selected and only when entities are present in all the selected years.

 

For example: The data table looks like below:

 

AnthonyJoseph_0-1678391188654.png

and when the years 2019 and 2020 are selected, the expected result is as below:

 

AnthonyJoseph_1-1678391235887.png

Similarly when years 2021 and 2022 are selected, the below output is expected.

 

AnthonyJoseph_2-1678391303599.png

 

Please can someone help me in getting this sorted.

 

Thanks,

AnthonyJoseph

 

2 REPLIES 2
FreemanZ
Super User
Super User

hi @AnthonyJoseph 

when the years 2019 and 2020 are selected, wht only India stands out?

@FreemanZ  Because only India has value in both the selected years (2019 and 2020).

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.