This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am trying to do a date mapping in the following data basis the the value present fields... Value > 0 , the first value month will start month and the last value >0 should be the end month.. Sample data i have given... Could you please help
| Identity | 1-Jan-25 | 1-Feb-25 | 1-Mar-25 | 1-Apr-25 | 1-May-25 | 1-Jun-25 | 1-Jul-25 | 1-Aug-25 | 1-Sep-25 | 1-Oct-25 | 1-Nov-25 | 1-Dec-25 | 1-Jan-26 | 1-Feb-26 | Start Period | End period |
| Item1 | 0 | 0 | 1 | 2 | 2 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 25-Mar | 25-Aug |
| Item2 | 0 | 1 | 2 | 2 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25-Feb | 25-Jul |
| Item3 | 0 | 1 | 2 | 2 | 2 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25-Feb | 25-Jul |
| Item4 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 2 | 2 | 2 | 2 | 0 | 0 | 0 | 25-Jun | 25-Nov |
| Item5 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 2 | 2 | 2 | 2 | 1 | 1 | 0 | 25-Jun | 26-Jan |
Solved! Go to Solution.
Hi @anu2021
Can you please try the below steps to get your requirement ?
1. Use below formula to get Start Period
=TEXT(INDEX($B$1:$O$1, MATCH(TRUE, INDEX(B2:O2>0, 0), 0)), "yy-mmm")
2. Use below formula to get End Period
=TEXT(INDEX($B$1:$O$1, MATCH(1, INDEX((B2:O2>0)*(COLUMN(B2:O2)=MAX(IF(B2:O2>0, COLUMN(B2:O2)))), 0), 0)), "yy-mmm")
I have also attached the excel file.
Hi @anu2021
Can you please try the below steps to get your requirement ?
1. Use below formula to get Start Period
=TEXT(INDEX($B$1:$O$1, MATCH(TRUE, INDEX(B2:O2>0, 0), 0)), "yy-mmm")
2. Use below formula to get End Period
=TEXT(INDEX($B$1:$O$1, MATCH(1, INDEX((B2:O2>0)*(COLUMN(B2:O2)=MAX(IF(B2:O2>0, COLUMN(B2:O2)))), 0), 0)), "yy-mmm")
I have also attached the excel file.
This helps and solves the problem for 2 lakh+ records... Thank you 🙂
Hi @anu2021
Please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. The sample data must actually represent your raw data and not simply the desired output. You may post a link to Excel or a sanitized copy of your PBIX stored in the cloud. Also, your image is very hard to read
hi, I am trying to attach the file.. however i am not finding an option to attach.. so updated it with the table view intead of image..
Hey @anu2021,
Could you please attach the excel file instead of image?
Image won't help understand the scenario.
Best regards,
Jainesh Poojara / Power BI Developer
i am unable to attach the file.. so tried pasting it in table view instead of Image.. 😞
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 25 | |
| 21 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 46 | |
| 23 | |
| 18 | |
| 18 |