I'm working with a dataset of 4.5 million entries, spanning 3 years and multiple other criteria that I'd like to slice the data on. Where I'm struggling is trying to get the financial values to re-rank based off the criteria selected.
I have the following fields in my data, all in one table:
PID: unique identifier for each person, may be duplicated across years but not within a single year
OM: sum of the financial value for each person in a given year
Year: the three years (2018-2020) in my dataset
Age: Person's age
Gender: Person's gender
Category: A buyer classification
Example (dummy) data:
At a bare minimum, I'd like to rank order OM and be able to see all three years or filter to a single year.
Example: Ordering within year 2018
Ranking across the whole dataset:
Ideally, I'd like to apply other filters, such as Category.
Do I need to create a new measure or column for every subset I want to explore? Can I create one dynamic function that will recalculate when different filters are applied?
Thank you for your help with this. I tested your solution and it works on the test data. Unfortunately, when I apply it to the full dataset, I'm getting strange results (see below).
This is on the unfiltered data (so, all years 2018-2020). As you can see, there's a tied rank for #7 and #19, even though the OM values are different. The rank ordering also skips #13 for no apparent reason.
Do you have any ideas as to what is causing this?
Hi @Anonymous ,
What is your corresponding expected result? Please give the expected results in tabular form.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please follow the recommendations in this thread to help us help you:
Click here to read more about the December 2021 Updates!
Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.
Mark your calendars and join us for our next Power BI Dev Camp!