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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
schoden
Post Partisan
Post Partisan

Continous Year

Hi Community, 

 

How can I check if a customer year of transaction is continous or not. 

In the table,  the customer A is not continous as 2018 transaction is missed. 

I have calender table and customer table.

 

 

Year Customer Revenue 
2015A50
2016A100
2017A20
2019A40
2020A200

 

Thanks.

 

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@schoden , refer to page two of the attached file after Signature, I created a flag

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

10 REPLIES 10
amitchandak
Super User
Super User

@schoden , refer to page two of the attached file after Signature, I created a flag

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you @amitchandak  So much 

amitchandak
Super User
Super User

Is your base data same as what you shared initially? If not, Can you share sample data and sample output in table format? I need to try on data now.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak   I have created a sample data. 

Customer A and B has continous year transaction but not Customer C and D. 

 

 

amitchandak
Super User
Super User

@schoden , Create a new column of the year first and try. Earlier will not allow quite a few options

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  got the diff column running.  But I am not able to acheive the outcome of my purpose.

 

 

 

Diff.JPG

 

Final measure =calculate(distinctcount(v_api_find_Opportunity[Company_RecID]) , filter(v_api_find_Opportunity, v_api_find_Opportunity[Diff]>1))
 
This measures return YEAR 2012 records only.
amitchandak
Super User
Super User

@schoden , You can create year on date or using related

year = related(Date[Year])

Or

Year = Year([Date])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak it still shows red line.

underline red.png

amitchandak
Super User
Super User

@schoden , Have a new column like this in you fact

Diff = [Year] - maxx(filter(Table,[customer] =earlier([customer]) && [Year] <earlier([Year])),[Year])

 

And then use a measure like

Measure = calculate(distinctcount(Table[Customer]) , filter(Table, Table[Diff]>1))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  I have Year from Calender table . 

If the new column is created in fact table, Year gets red underlined. 

How Can i refer year from calender table in the fact table.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.