Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a table like below:
Name | Program | Myear | Period | Data |
ABCD123 | 8765 | 2019.0 | Jan-19 | 34 |
ABCD123 | 8765 | 2019.0 | Feb-19 | 3 |
ABCD123 | 8765 | 2019.0 | Mar-19 | 23 |
ABCD123 | 8765 | 2019.0 | Apr-19 | 15 |
ABCD123 | 8765 | 2019.0 | May-19 | 31 |
ZXCV321 | 8765 | 2019.0 | Jan-19 | 12 |
ZXCV321 | 8765 | 2019.0 | Feb-19 | 22 |
Table is having data for some specific months only but I need to generate a report as fixed for all months in the year. For example Jan - Dec 2019. if no data in the table then I want to display 0 for those months which is not in the table.
For example:
Name | Program | Myear | Period | Jan-19 | Feb-19 | Mar-19 | Apr-19 | May-19 | Jun-19 | Jul-19 | Aug-19 | Sep-19 | Oct-19 | Nov-19 | Dec-19 |
ABCD123 | 8765 | 2019.0 | 34 | 3 | 23 | 15 | 31 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
ZXCV321 | 8765 | 2019.0 | 12 | 22 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
is it possible using pivot table please? can anyone give any idea to achieve a report like this?
Thank you in advance.
I think in order to do this, you would need to Generate Missing Data in the script.
Charles, did Sunny's post & link help you, or are you still trying to sort things out? If Sunny's post did help, be sure to use the Accept as Solution button on his post to give him credit and let others know things worked. If you are did something else, consider letting us know what that was, and once you post it, you can use the same button on your post as I mentioned above to mark it as the solution. If you are still trying to figure things out, leave an update as to where you are with things.
Regards,
Brett
Thank you Sunny T for your response. As a learner I couldn't able to fully understand and I couldn't achieve what I need.
I will keep you update when I done this.
Thank you so much.