Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi
Im trying to Create a report that lists by month, top 10 categories month by month, some will change each months so in need to reflect this , is this possible?
Solved! Go to Solution.
Hi @dommyw277 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Count =
var _select=SELECTEDVALUE('Table'[Month])
return
COUNTX(FILTER(ALL('Table'),'Table'[Month]=_select&&'Table'[Group]=MAX('Table'[Group])),[Group])
rank =
RANKX(ALL('Table'),[Count],,DESC,Dense)
Flag =
IF(
[rank]<=10,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
For errors, you can refer to:
If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @dommyw277 ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Count =
var _select=SELECTEDVALUE('Table'[Month])
return
COUNTX(FILTER(ALL('Table'),'Table'[Month]=_select&&'Table'[Group]=MAX('Table'[Group])),[Group])
rank =
RANKX(ALL('Table'),[Count],,DESC,Dense)
Flag =
IF(
[rank]<=10,1,0)
2. Place [Flag]in Filters, set is=1, apply filter.
3. Result:
For errors, you can refer to:
If I have misunderstood your meaning, please provide your desired output and your pbix without privacy information.
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you so much! Works a treat
So using the table I have called ReportData , the fields are Category and Month , I have this - can anyone help where im going wrong please?
calculate(Sum(ReportData[Category]) ,TOPN(10,all(ReportData[Category]),calculate(Sum(ReportData[Month]) )), values(ReportData[Category]))
Hi,
This measure is correct. What problem are you facing?
The issue appears to be that im trying to SUM Text fields so maybe thats why the TOP n argument isnt working?
calculate(Sum(ReportData[Category]) ,TOPN(10,all(ReportData[Category]),calculate(Sum(ReportData[Month]) )), values(ReportData[Category]))
Hi,
Does this work?
=calculate(countrows(ReportData) ,TOPN(10,all(ReportData[Category]),calculate(Sum(ReportData[Month]) )), values(ReportData[Category]))
Hi, so ReportData is replaced by NewCherwell however i get these messages. Maybe because Month is a part of created date time?
Hi,
I cannot help without having access to your file.
Hi im getting this message:
ReportData is replaced by CherwellNEW for info
Hi, what do i put where the value is?
@dommyw277 , Create a TOPN measure and display is with month and category
calculate(Sum(Table[Value]) ,TOPN(1,all(Table[category]),calculate(Sum(Table[Value]) )), values(Table[category]))
or refer this
https://www.sqlbi.com/articles/filtering-the-top-3-products-for-each-category-in-power-bi/
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |