Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Ngoc_Nguyen
Frequent Visitor

Find values that appear in 3 consecutive months

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.

YearMonthNamePercentage
202305A0.5
202304A0.3
202305B0.56
202302B0.33
202306B0.15
202307B0.67
202303A0.8

 

Here is what I want to achieve:

YearMonthNamePercentage
202305A0.5
202304A0.3
202303A 0.8
202307B0.67
202306B0.15
202305B0.56
4 REPLIES 4
Ngoc_Nguyen
Frequent Visitor

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:

YearMonthNamePercentage
202305A0.5
202304A0.3
202305B0.56
202302B0.33
202306B0.15
202307B0.67
202303A0.8

 

Result when filtering 07/2023:

YearMonthNamePercentage
202307B0.67
202306B0.15
202305B0.56

 

Result when filtering 05/2023:

YearMonthNamePercentage
202305A0.5
202304A0.3
202303A0.8

 

Can I interest you in a chart based solution?

 

lbendlin_0-1694459627279.png

 

Yes please, it would be great if it is a line chart 

lbendlin
Super User
Super User

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.

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.