Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi there,
I am, for the first time, using RANKX for reporting different data both in a descending and an ascending way.
I've had no issues with DESC, but for some reason ASC always starts at 2. It seems that everything else that's in my DimBusiness table, that I'm not interested in/is filtered out, becomes a 1. I don't know how to manage it. Obviously my filters are wrong.
I'm using this:
Ranking Ave =
RANKX( ALL(DimBusiness[BusinessName]), CALCULATE( [Weighted Ave],
KEEPFILTERS( DATESBETWEEN( Dim[CalendarDate], [ReportingStartDate], [ReportingEndDate] ) ) ),
, ASC, DENSE )
Others have had the same issues, but I can't wrap my head around it. Help much appreciated.
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please try something like below.
Ranking Ave =
VAR _t =
FILTER ( ALL ( DimBusiness[BusinessName] ), ( NOT [Weighted Ave] = 0 ) )
RETURN
RANKX (
_t,
CALCULATE (
[Weighted Ave],
KEEPFILTERS (
DATESBETWEEN ( Dim[CalendarDate], [ReportingStartDate], [ReportingEndDate] )
)
),
,
ASC,
DENSE
)
Hi,
I am not sure if I understood your question correctly, but please try something like below.
Ranking Ave =
VAR _t =
FILTER ( ALL ( DimBusiness[BusinessName] ), ( NOT [Weighted Ave] = 0 ) )
RETURN
RANKX (
_t,
CALCULATE (
[Weighted Ave],
KEEPFILTERS (
DATESBETWEEN ( Dim[CalendarDate], [ReportingStartDate], [ReportingEndDate] )
)
),
,
ASC,
DENSE
)
This seems to have worked. Thanks very much.
Are you able to explain what the issue was?
Hi,
I tried to create a virtual table, inside the measure, that does not contain zero value of [Weighted Ave]. And then, I tried to rank among the virtual table.
If you want to change the condition, you can try altering the below part.
VAR _t =
FILTER ( ALL ( DimBusiness[BusinessName] ), ( NOT [Weighted Ave] = 0 ) )
I hope this explains.
Thank you.
Hi @greenskmachine2 ,
the reason could be the presence of blank values in your measure [Weighted Ave]. please share sample data if possible
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |