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
bog12345
Frequent Visitor

compare rows and time

 

Hi ,

 

I need some help with Dax. 

There are 4 column in my test table as follows:

-ID: every customer have unique ID, every row means one subscription

-start of service: The start of the subscription

-end of service: the end of the subscription

-number of service: it has 3 possible value: 1 if the customer have 1 channel, 2 if 2 channel and 3 if 3 channel

I would like to create a calculate column (Changing column) which indicate that the customer changed to a smaller subsciprtion or not (it means change to a fewer channel). I would like to get a 0 value, if the customer didn't changed his earliest subscription to a smaller channel and 1 if  yes. I would like to get the following table and I need help how to calculate Changin column?

change_2.png

 

 

Thanks in advance

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution in this workbook.  Go to PowerPivot > Manage.  You can import this into PowerBI dekstop by simply going to File > Import > Excel file.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

You may refer to my solution in this workbook.  Go to PowerPivot > Manage.  You can import this into PowerBI dekstop by simply going to File > Import > Excel file.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Dear Ashish_Mathur,

 

Thanks for your solution, it seems to be good. But I have more questions, how you make the Index column?

 

Thanks in advance,

 

Bog

Hi,

 

I did that using the Query Editor.  I wrote an M code there is get those numbers.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Dear Ashish_Mathur,

 

Thank you very much, it works.

 

I'm very grateful.

You are most welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.