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
Anonymous
Not applicable

State-transition table

Hello,

I want to create a state-transition table using Power BI. My goal is something like the following table

From 2014/To 2015ABC 
A3115
B2316
C0235
 56516

 

The table describes the following: From 2014 to 2015 3 persons stayed in category A, 1 person moved from A to B, 1 person moved from A to C, 2  persons moved from B to A, 3 persons stay in B and so on.

 

I want the years to be dynamic, for example, I would also like to see the transitions from 2010 to 2015 or 2012 to 2014.

 

How does my data have to look like and how do I create such a state-transition table? I didn't find any information about that and I don't know how to start. I am quite new to PowerBI.

 

Best regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Greg_Deckler I solved the problem. I used a table like the following:

 

Start YearCategory StartEnd YearCategory EndAmount
2013A2014A2
2013B2014A3
2014A2015B4

 

Then I used category start as rows, category end as column and amount as values and two filters for start year and end year, respectively.

 

Best regards

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Anonymous - Taking a closer look at this. However, right off the bat, I do not see how you accomplish this without using a disconnected table for either your row or column states. This assumes that what you want is this presented in a matrix visualization.

 

I'm fairly certain that you could get there with your data in this kind of state:

Year State ID

2014 A 1
2014 B 2
2014 C 3
2014 A 4
2014 A 5
2014 B 6
2015 A 1
2015 B 2
2015 C 3
2015 A 4
2015 A 5
2015 C 6

 

Might be able to do it as well with

ID 2014 2015

1 A A
2 B B
3 C C
4 A B

 

But doubt that would be better.


@ 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...
Anonymous
Not applicable

@Greg_Deckler I solved the problem. I used a table like the following:

 

Start YearCategory StartEnd YearCategory EndAmount
2013A2014A2
2013B2014A3
2014A2015B4

 

Then I used category start as rows, category end as column and amount as values and two filters for start year and end year, respectively.

 

Best regards

Anonymous
Not applicable

Thank you for your answer. Yes, at the moment I have that first type of table, but I don't know how to move on 😕 If you have any idea @Greg_Deckler, please let me know.

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.