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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Creating filter column that puts a flag en every record if there were 4 consecutive same categories

Hello everyone, I'm trying to create a calculated column in a table to then use it as a filter in a report.

I have two posible categories "A" and "B", I need to put a yes in the calculated column if I have four consecutive A´s for the same name (in each of the rows with the consecutive A's, furthermore, if there are more than 4 consecutive A's, this rows should also get yes as a result. 

 

Following a table example with the column flag showing the expected result for this calculated column:

datenamecategoryflag
01-01-23OscarAyes
02-01-23OscarAyes
03-01-23OscarAyes
04-01-23OscarAyes
05-01-23OscarAyes
01-01-23JuanBno
02-01-23JuanBno
03-01-23JuanBno
04-01-23JuanAno
05-01-23JuanBno
01-01-23BryanBno
02-01-23BryanBno
03-01-23BryanBno
04-01-23BryanBno
05-01-23BryanAyes
06-01-23BryanAyes
07-01-23BryanAyes
08-01-23BryanAyes
01-01-23JessicaAno
02-01-23JessicaAno
03-01-23JessicaBno
04-01-23JessicaAyes
05-01-23JessicaAyes
06-01-23JessicaAyes
07-01-23JessicaAyes

 

Thanks very much in advance.

2 REPLIES 2
johnyip
Super User
Super User

Do you need to have this calculated column do the calculation based on the row order of your raw data, or the order the records are displayed in a table/matrix vis?



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
Anonymous
Not applicable

hi, the order of the records is based on the date column

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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