Forum Discussion
Finding Repeated values in a table, within a date range
- 9 years ago
This is quite a tricky problem. I think it is best solved before you load the data rather than trying to solve it in Power BI using DAX.
I have a working solution for your here. https://www.dropbox.com/s/51eicg5p2wo6sfu/repeat%20ticket.pbix?dl=1
I had to use a stack of Power Query tricks to so I could find the previous record for each cusotmer and compare the close date. I think this needs a blog article to explain as there a lot in it. Let me see what I can do for this Tuesday.
Edit: this is now on my blog at http://exceleratorbi.com.au/use-power-query-compare-database-records/
It depends on your data. please post a sample of the data model/tables of data so someone can help.
- twalsh06259 years ago
Advocate I
Ok, bear with me:
Case_ID Customer Open Date Close Date
1234 ABC 5/1/17 5/2/17
4567 XYZ 5/9/17 5/12/17
8888 ABC 5/3/17 5/5/17
I would like to flag CASE_ID as a repeat issue because it is on Customer ABC with an open date that is within 7 days of the close date of another ABC case....
- MattAllington9 years ago
Community Champion
This is quite a tricky problem. I think it is best solved before you load the data rather than trying to solve it in Power BI using DAX.
I have a working solution for your here. https://www.dropbox.com/s/51eicg5p2wo6sfu/repeat%20ticket.pbix?dl=1
I had to use a stack of Power Query tricks to so I could find the previous record for each cusotmer and compare the close date. I think this needs a blog article to explain as there a lot in it. Let me see what I can do for this Tuesday.
Edit: this is now on my blog at http://exceleratorbi.com.au/use-power-query-compare-database-records/
- twalsh06259 years ago
Advocate I
Holy crap did it work!
This data is going to be extremely helpful, thank you so much!!!!