Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello friends,
I would like to find values in column Name in table Fact that appear consistently in 3 consecutive months and list them in the table with their according values in column Percentage. I also have a YearMonth dim table that has a column that joins with column YearMonth in the fact table. Please have a look at the example below for better demonstration.
Any help is welcomed. Thanks so much for all.
Here is an example of my data.
YearMonth | Name | Percentage |
202305 | A | 0.5 |
202304 | A | 0.3 |
202305 | B | 0.56 |
202302 | B | 0.33 |
202306 | B | 0.15 |
202307 | B | 0.67 |
202303 | A | 0.8 |
Here is what I want to achieve:
YearMonth | Name | Percentage |
202305 | A | 0.5 |
202304 | A | 0.3 |
202303 | A | 0.8 |
202307 | B | 0.67 |
202306 | B | 0.15 |
202305 | B | 0.56 |
hi,
tks so much for replying
perhaps i wasnt clear on what i want. The idea is that when i filter a month, i can get the table (including name, percentage) that have appeared in the last 3 months since the month I filtered. And about the scenario that you've mentioned, i think that if the name appeared more than 3 consecutive months, its also included in the last 3 months.
Hope this helps!
Example data:
YearMonth | Name | Percentage |
202305 | A | 0.5 |
202304 | A | 0.3 |
202305 | B | 0.56 |
202302 | B | 0.33 |
202306 | B | 0.15 |
202307 | B | 0.67 |
202303 | A | 0.8 |
Result when filtering 07/2023:
YearMonth | Name | Percentage |
202307 | B | 0.67 |
202306 | B | 0.15 |
202305 | B | 0.56 |
Result when filtering 05/2023:
YearMonth | Name | Percentage |
202305 | A | 0.5 |
202304 | A | 0.3 |
202303 | A | 0.8 |
Can I interest you in a chart based solution?
Yes please, it would be great if it is a line chart
There are many more scenarios that you need to explain and cover (what if there are more than three consecutive months?)
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |