The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello PowerBI Community,
I am new to PowerBI and trying out a few things here and would like your support.
I created a column rank that ranks my weekly dates as seen below;
The challenge that Iam facing however is that I have measures that I am using to calculate the week over week counts difference and since I created WeekSortRank as column, it does not change dynamically depending on the filter, as seen below;
As you can see above, when filters are applied, the week old ranks are still maintained because it was a column and not a measure, and in the end, WeekSortEnrollmentLastWeek also ends up skipping some of the previous WeekSortEnrollement which is ideally supposed to pick from.
Therefore, I would like to have the WeekSortRank to be created by a measure since this adjusts well with filters and I believe this will inturn solve the WeekSortEnollmentLastWeek.
Cuurent code that I used to create the above columns
Solved! Go to Solution.
Hi, @SamuelO ,
If you want to create a measure.
rankmeasure = RANKX(ALLSELECTED('Table'),CALCULATE( MAX('Table'[Date])),,ASC)
The final show:
sort by text column is okey
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @SamuelO ,
If you want to create a measure.
rankmeasure = RANKX(ALLSELECTED('Table'),CALCULATE( MAX('Table'[Date])),,ASC)
The final show:
sort by text column is okey
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @v-yalanwu-msft.
The code above worked fine for me by adding the ,dense.
I appreciate your time.
@SamuelO , If you are looking for this week Vs Last week and you have selected a week in the slicer , then you all not allselected
WeekSortEnrollmentLastWeek = CALCULATE([WeekSortEnrollment], FILTER(ALL('Data Table'),
'Data Table'[WeekSortRank] = MAX('Data Table'[WeekSortRank])-1))
refer
Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8
Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s
Thank you so much @amitchandak for your time on this.
So for the WeekSortRank above, how can I create a measure that ranks basing on the alphabetical sorting?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
18 | |
18 | |
17 | |
15 | |
13 |
User | Count |
---|---|
36 | |
35 | |
20 | |
18 | |
18 |