Forum Discussion
PorterHaus
8 years agoFrequent Visitor
Grouping in Rankx
I have some data about reports and when they are run as well as some other details. I'm trying to create a new rank column based on how many times a report is run in the given context so that eventua...
PorterHaus
8 years agoFrequent Visitor
My apologies if I was unclear before. If I select a date range, let's say last 30 days, I would expect to see the report names, # of times run, and then rank where rank 1 is the report run the most and vice versa.
So in the table screenshot before, the report run 112 times would have rank 1 and all of those reports are limited to the past 30 days.
jmalone
Resolver III
8 years agoI see. In that case, you shouldn't need any special grouping, and maybe that's where the confusion is coming from.
You should be able to use the following measure:
Ranking =
RANKX (
ALL ( 'ReportStatistics'[ReportName] ),
CALCULATE ( COUNTROWS ( 'ReportStatistics' ) )
)
To filter by date, use the [RunDate] field in a slicer. The slicer will allow you to select a date range, and the measure should adjust to rank according to that selection.