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
robertrund318
Regular Visitor

DAX expression for progression of program year over year

I need an expression that will return a quantity of people that have progressed from one program to the next program year over year.

For example, I have 5 people from Program 1 in 2019 that stayed in Program 1 in 2020 and 10 people that progressed to Program 2.  I have 11 people that stayed in Program 2 from 2019 and 15 that progressed to program 3.  I need the expression that will get the number of people that "Progressed to the Next Program" 

 

I've tried a few different things and can get the number of people that stayed in the same program, but not the progression.

 

ProgramProgram 1 2020Program 2 2020Program 3 2020Program 4 2020Progressed to Next Program
Program 1 2019510  10
Program 2 2019 1115 15
Program 3 2019  161818
Program 4 2019   6 

 

Thanks.

1 ACCEPTED SOLUTION

Well, you could brute force it:

Progressed =
SWITCH(
[Program],
"Program 1 2019",[Program 2 2020],
"Program 2 2019",[Program 3 2020],
"Program 3 2019",[Program 4 2020],
BLANK()
)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

7 REPLIES 7
Greg_Deckler
Super User
Super User

Is that your source data or expected output? 

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

This is example data.  The expected output would be the last column based on the data in the previous columns.

@robertrund318 , there is no data in last reply

@amitchandakSorry, I was referring back to the original post and the data there.  I was answering the previous question by @Greg_Deckler 

 

The "Progressed to Next Program" is the column I am trying to come up with an expression for using the data in the previous columns.

ProgramProgram 1 2020Program 2 2020Program 3 2020Program 4 2020Progressed to Next Program
Program 1 2019510  10
Program 2 2019 1115 15
Program 3 2019  161818
Program 4 2019   6 

Well, you could brute force it:

Progressed =
SWITCH(
[Program],
"Program 1 2019",[Program 2 2020],
"Program 2 2019",[Program 3 2020],
"Program 3 2019",[Program 4 2020],
BLANK()
)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Not the most elegant approach, but it did solve the problem.  

Hi @robertrund318 ,

 

Check this file: Download PBIX 

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



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.