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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Syndicate_Admin
Administrator
Administrator

count monthly not from single customers with valid contracts based on start and end date

Hello everyone

I'm new to power bi and have a problem with the following problem:

I have a table with customer name, contract number, start date, and contract date.

In this table you might have more than one valid contract per customer, or consecutive validity contracts per customer, or some without a valid contract.

1. I want to be able to create a matrix view that is counting unique customers with active contracts on a monthly basis

2. Another matrix with customers lost on monthly bases

2. Another matrix with profit customers on a monthly basis

Input table :

Customer nameContract notvalid from new valid for (end of month)
A1/201801.04.2018 31.03.2019
A6/201901.04.2019 31.03.2020
A11/202001.04.2020 31.03.2021
B3/201701.02.2017 31.12.2018
B8/201901.04.2019 31.03.2020
B8/202001.04.2020 31.03.2021
C10/201601.11.2016 31.10.2018
C10/201801.01.2018 28.02.2019
C10/201901.11.2019 31.10.2020
D4/201601.01.2017 31.12.2018
D5/201801.01.2019 31.12.2019
D6/201801.01.2019 31.12.2019
D7/201901.01.2020 31.12.2020
she1 /201501.04.2016 31.12.2017
she2 /201501.03.2016 31.12.2017
she7 /201501.03.2016 31.12.2017
she4/201701.01.2018 31.12.2018
she5/201701.01.2018 31.12.2018
she6/201701.01.2018 31.12.2018
she20/201801.01.2019 31.12.2020
she21/201801.01.2019 31.12.2020
she22/201801.01.2019 31.12.2020
she30/201801.01.2019 31.12.2020
she35/201801.01.2019 31.12.2020
she39/201801.01.2019 31.12.2020

result:

1. matrix1 : not of customers with active contract (I have created a table only with 5 monts)

20182019201920192019
matrix 1DecemberJanuaryFebruaryMarchApril
A11111
B1 1
C111
D11111
she11111

2: No lost customers

20182019201920192019
matrix 2DecemberJanuaryFebruaryMarchApril
A
B 1
C 1
D
she

3. No new customers

20182019201920192019
matrix 3DecemberJanuaryFebruaryMarchApril
A
B 1
C
D
she

Thank you.

1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

You said ,you have a table with column customer name, contract number, start date, and contract date,but in the below ,I see the column   Customer name, Contract not, valid from ,new valid for (end of month).

Also can you give an example of how to get the output table from the input table?

 

 

Best Regards

Lucien

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors