Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have tried many approaches but failed to reach a solution.
So here goes the problem.
I want to find the rank dynamically based on the current selected date filter in the view. I want to find the rank partitioned by BugId and ordered by Pipeline for those rows that are present in the current filtered view.
I am using the following formula:
BugPipelineRank = RANKX( CALCULATETABLE(RawOfflineStats, ALLEXCEPT(RawOfflineStats, RawOfflineStats[BugId])), RawOfflineStats[Pipeline], RawOfflineStats[Pipeline],, Dense )
Detailed explanation from here.
The result is as below
The above results does look correct until you apply a shorter date filter.
Now BugPipelineRank should be 1 in this case, but it is not. I understand that 'CALCULATETABLE(RawOfflineStats, ALLEXCEPT(RawOfflineStats, RawOfflineStats[BugId]))' is picking up the entire table. How should I modify the formula to pick up only the set of filtered rows?
I've tried several variations, but if someone can point me in the right direction I'd appreciate it.
Thanks.
Hello,
your ALLEXCEPT statement results in the same BugPipelineRank no matter which Date Filter you apply.
I don't think your CALCULATETABLE statement isn't necessary.
Please replace it with the TableName only instead of CALCULATETABLE and let us know.
Best regards.
No it did not work.
I am trying to achieve the DAX equivalent of the following SQL
SELECT
EmailDate,
Pipeline,
BugId,
DENSE_RANK() OVER( partition by BugId order by Pipeline) as BugPipelineRank
FROM
RawOfflineStats
In the above query, RawOfflineStats is the complete table, I want to achieve the same on the filtered view in my report.
The solution you suggested will not do a partition by BugId.
Hello,
this should be fine:
BugPipelineRank =
RANKX(RawOfflineStats, RawOfflineStats[Pipeline], RawOfflineStats[BugID],, Dense )
No it did not work.
As per the documentation you are trying to do
DENSE_RANK() OVER( partition by Pipeline, BugId) as BugPipelineRank
which is not the intention.
Having the same problem. I have
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |