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
MoJi
New Member

Dynamic Top N Product of count distinct Number of Case By Period

 

sample_top.png

 

Form Pictiure Above, If I want Power BI Bar Chart to display only TOP 2 Product of  Each Month How Can I Do That From the dataset that I provided.

 

 Thanks

1 REPLY 1
Anonymous
Not applicable

Hi @MoJi,

 

I'd like to suggest you write a calculated column which used to calculate current row ranking, then use if function to filter it(rank less or equal to 2) and use the calculated column as the value field.

 

For example:

 

Dynamic Value=
var currRank = formula
return
if(currRank <=2,[Value Column],blank())

 

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.