Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all,
I have a data set for customer survey results, and we classify each customer as Good, Passive, Weak. My goal is to create a sankey and track customers who move up or down the classifications by survey period.
The goal table I want looks something like this:
Period Start | Period Start Classification | Period End | Period End Classification | Value |
Q2 2020 | Good | Q4 2020 | Good | |
Q2 2020 | Good | Q4 2020 | Passive | |
Q2 2020 | Good | Q4 2020 | Weak | |
Q2 2020 | Passive | Q4 2020 | Good | |
Q2 2020 | Passive | Q4 2020 | Passive | |
Q2 2020 | Passive | Q4 2020 | Weak | |
Q2 2020 | Weak | Q4 2020 | Good | |
Q2 2020 | Weak | Q4 2020 | Passive | |
Q2 2020 | Weak | Q4 2020 | Weak | |
Q4 2020 | Good | Q2 2021 | Good | |
Q4 2020 | Good | Q2 2021 | Passive | |
Q4 2020 | Good | Q2 2021 | Weak |
Which is essentially a matrix of each survey period, the classification then the proceeding period and classification. I have this table set up, the challenge is calculating the value. So the first row is the number of customers who were classified as good in one survey, then good in the proceeding.
I'm attempting this with a column calculation. Essentially I want to count from the main survey data table, the number of customers where survey period = period start & classification = Period Start Classification AND survey period = period end & classification = Period end Classification. This of course creates a conflict because you can't filter the table twice.
So I'm thinking I want to do something like, for each customer ID in a filtered table (that being the start period and classification) that also appear in another filtered table (end period and classification). Only, I can't seem to get it to work.
My customer survey data is like the following:
Customer ID | Survey Period | Classification |
100 | Q2 2020 | Passive |
101 | Q2 2020 | Good |
100 | Q4 2020 | Good |
101 | Q4 2020 | Good |
Hope this makes sense. Thank you
Solved! Go to Solution.
Hi everyone,
I solved it in the end with this:
Hi everyone,
I solved it in the end with this:
So far so good. The only thing really missing is a lookup of the "prior" status for each entry. You can implement that in Power Query or DAX. Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post (as you did) or use one of the file services.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
74 | |
71 | |
56 | |
37 | |
33 |
User | Count |
---|---|
71 | |
65 | |
58 | |
50 | |
47 |