The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
I have the following dataset at my disposal and I'm looking at ranking the SumColumns shown in the dataset after a specific date of 2024, 9, 8 but as you can see there are duplicate values in the sum columns created (dax shown underneath) - and creating this rank measure would also mean dates before 2024, 8, 9 would need to be excluded. I included my current solution underneath these photos that duplicates the table, however I would want to avoid this and just write a new Dax with a new date in when the time comes to change ranges.
Duplication solution:
Thanks for your help in advance!
Jordan
Solved! Go to Solution.
Since I don't know what your data looks like, please try creating a measure to calculate the rank using the following DAX to see if that helps.
RankAfterDate =
VAR SpecificDate = DATE(2024, 8, 9)
RETURN
RANKX(
FILTER(
ALL('YourTable'),
'YourTable'[DateColumn] > SpecificDate
),
CALCULATE(SUM('YourTable'[SumColumn])),
,
DESC,
DENSE
)
If it doesn't work, please provide some sample data, and remember to protect your data privacy in the sample data.
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Since I don't know what your data looks like, please try creating a measure to calculate the rank using the following DAX to see if that helps.
RankAfterDate =
VAR SpecificDate = DATE(2024, 8, 9)
RETURN
RANKX(
FILTER(
ALL('YourTable'),
'YourTable'[DateColumn] > SpecificDate
),
CALCULATE(SUM('YourTable'[SumColumn])),
,
DESC,
DENSE
)
If it doesn't work, please provide some sample data, and remember to protect your data privacy in the sample data.
Best Regards,
Jarvis Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much! This worked for me!
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
14 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
13 | |
7 | |
5 |