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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ivandelgra
Helper I
Helper I

How to count instance changes in a column YoY

Hello I have this dataset:

 

ID PERSONCARD TYPESUBSCRIPTION YEAR
AFREE2018
APREMIUM2019
BPREMIUM2018
BPRO2019
CFREE2018
CPRO2019
DFREE2018
DPRO2018
EFREE2018
EPRO2018

 

I would like to know for each year (from 2018 to 2019):

  • how many FREE subscribers have changed their plan to PRO subscribers
  • how many FREE subscribers have not changed their plan
  • how many FREE subscribers have changed their plan to PREMIUM subscribers

I need of course the other combinations, too. 

Please note that someone can change the plan during the same year (as for D and E id person)
Can you help me?
 

 

Thank you so much. 

@Greg_Deckler @amitchandak @Mariusz 

6 REPLIES 6
Anonymous
Not applicable

You can't do this because within a single year there's no way of telling the sequence of events in time.

Unless there's a rule that says it's always true that if there are different card types for a person in a year, FREE always precedes PRO. But what will happen if somebody changes the type many times a year?

Best
D

Hi @Anonymous. Supposing instead that no one can change the plan during the same year, which solution you would find? Thank you
Anonymous
Not applicable

That's trivial then.

 

I would like to know for each year (from 2018 to 2019):

  • how many FREE subscribers have changed their plan to PRO subscribers
    • 0
  • how many FREE subscribers have not changed their plan
    • just count the people with FREE entries in the table
  • how many FREE subscribers have changed their plan to PREMIUM subscribers
    • 0

Best

D

@Anonymous Maybe I explain wrong. I’m sorry for the english. I intended if no one can change MANY TIMES the plan in the same year which would be the solution? That it is, if only one time a year you can change the plan what would you do?
Anyway, as regards to “ You can't do this because within a single year there's no way of telling the sequence of events in time “, if it can be useful, the chrononological order of the subscription/change come from the order of the row: the last subscription (or the last change) is the last row.
Anonymous
Not applicable

Sorry, but in DAX THERE IS NO ORDER OF THE ROW. It's not Excel.

Best
D

But @Anonymous there is the possibility to add an index. Isnt't true? I'm reasoning in row context, but i don't know what formula enter in the calculated column. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors