Forum Discussion
kiwicam
5 years agoHelper I
Count and Rank by Specific Time Period when Filtering Certain Data
Hi, I am hoping someone can please help me solve the following issue. I am trying to count and rank the shops (Shops 1 to 😎 that sell a specific product (Product1) over a specific period (daily...
- 5 years ago
Ok, so this was solved by changing "ALLSELECTED" to "ALL".
Before
Shop Count = CALCULATE(DISTINCTCOUNTNOBLANK(sample_data[Shop]), ALLSELECTED(sample_data[Shop]))
After
Shop Count = CALCULATE(DISTINCTCOUNTNOBLANK(sample_data[Shop]), ALL(sample_data[Shop]))Thank you everyone for your help!
amitchandak
5 years agoSuper User
kiwicam , Try like
Shop Rank = RANKX(filter(ALLselected(sample_data[Shop],sample_data[Date]),sample_data[Date] =max(sample_data[Date])) , [Total Sales])
kiwicam
5 years agoHelper I
Thanks amitchandak!
I really appreciate the help and quick response!
Unfortunately, your suggestion also ranks shops with no volume as "1" (alongside the top ranked shop).