Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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
User | Count |
---|---|
79 | |
74 | |
62 | |
61 | |
45 |
User | Count |
---|---|
108 | |
98 | |
89 | |
82 | |
61 |