Forum Discussion
Finding repeated values over consecutive dates
- 8 years ago
Thank you so much - this works, but too well.
We have been selling items for 90 days. Unfortunately, the data we download is done in 365 day groupings. As a result, we have 275 days of items that are 0 sales, so every item comes up with an alert.
I thought that a visual level filter might fix it, but I'm guessing that due to the index and group columns, we are able to calculate past the last 90 days.
Is there a way to limit my view to 90 days since a visual level filter isn't cutting it?
(Also - I need to reiterate - I'm VERY grateful for your help and patience).
jlankford,
I am not very clear about your requirment, do you mean that limit the dates in Matrix to show only 90 days? If so, you can filter dates in visual level filter.
If visual level filter doesn't help, please post complete data of your table and post expected result in screenshot.
Regards,
Lydia
- jlankford8 years agoAdvocate I
Hi,
Thank you again for your reply, and sorry for the delay in getting back to you.Below is a screenshot. I used a visual filter to only show the dates 9/28/2017 - 10/6/2017
As you can see, we have ample inventory, and no zeroes. Unfortunately, "ALERT" always reads a number (the reason these numbers are higher than "1" is because I have products belonging to each store that I wish to obscure for now).
In this data source, it contains the most recent 180 days. For some products, we have had good inventory, so I get "0" for an alert, which is what we want. However, other products, we did not begin selling until 90 days ago, meaning that we have 90 days before it where inventory reads "0". Even with the visual filter showing only 90 days, "alert" still reads a "1" for these products.
Thank you again for your help and attention.
- Ashish_Mathur8 years agoSuper User
Hi jlankford,
Whom are you replying to? If it is to my post, then tell me exactly the scenario where it is not working.
- jlankford8 years agoAdvocate I
Hi Ashish,
Thanks for your reply. I'm sorry for not specifying, but I was replying to your post.
In your example above in power pivot, that particular measure successfully marks a "1" everytime there is a "0" in the data, but I need it to mark a "1" on any row that has a stretch of five 0's in succession.
For instance:
In the example you provided (see image below), you can see that the row "LMN" has five 0's in succession. I need some indicator to let me know that LMN has a grouping of five 0's.
You can also see in row XYZ there are only two zeros. There is no need to mark these.
I really appreciate everyone's help, and I'm using this as a learning opportunity and not just copy/pasting DAX. Having used standard pivot tables for years, I had no idea there was a whole new world with power pivot and Power BI until just a few months ago.
Thank you.