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.
Hi Community and Experts,
I am looking for helps and suggestions on the Power Query transformation. This is my initial input:
MemberID | Date | Status |
1 | 1/1/2021 | 1 |
1 | 1/5/2021 | 1 |
1 | 2/3/2021 | 0 |
1 | 2/5/2021 | 1 |
1 | 3/3/2021 | 0 |
1 | 3/3/2021 | 1 |
1 | 3/8/2021 | 1 |
This is what I am expecting in my output:
MemberID | Start Date | End Date |
1 | 1/1/2021 | 2/3/2021 |
1 | 2/5/2021 | 3/3/2021 |
1 | 3/3/2021 | 3/8/2021 |
1 is active status, 2 is deactivate status. Every time the member logs in, it will be recorded as 1. If the member havent logged in a X number of days, they will be deativated and status set to 0, and has to log in to get their status change to 1. My output is just the number of active days for each member.
Solved! Go to Solution.
Hi @Anonymous,
The simple way is adding two custom columns to extract the date values when status equal to 1 or 0.
Then you can use the 'fill' feature to fill the blank values and add a filter to keep rows that include 'start' and 'end' dates.
Fill values in a column | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi @Anonymous,
The simple way is adding two custom columns to extract the date values when status equal to 1 or 0.
Then you can use the 'fill' feature to fill the blank values and add a filter to keep rows that include 'start' and 'end' dates.
Fill values in a column | Microsoft Docs
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |