on ‎2019 Mar 05 6:13 AM
Hello All,
I have a requirement where I need to show the forecasts of sales and revenue for the coming days of the month which the data is coming from BEx query as shown in the table(Figure 1).
I would require to represent the same in a calendar format shown in the image attached.
Please suggest how to achieve.
Figure 1:
Datesales ForecastRevenue Forecast5th March200$100$6th March250$110$7th March240$115$8th March255$100$9th March200$120$10th March180$100$11th March200$90$---31st March220$120$
Figure 2: Attached
Request clarification before answering.
Hi Vishal,
This is relatively easy to achieve from a formatting perspective.
The hardest part is the formatting piece. Start with creating a second query against an integer range that will return values from 1 to 6. I have called this [DayOffset] in my query. The values are needed to dynamically size the "hidden" table that sits in front of the first table.
Once you have run both your queries, only three variables need to be created:
Once you have created the variables, add them to your default table block. It will make it a little easier to begin with:

Next, apply a filter to the table block: [Marker] Between 0 And 6

Now, apply your first formatting to the table. Start with turning the table into a cross table and adding two rows above the header:

Add "Sales" and "Forecast" to both top row header cells, then move [Day Name] from the vertical axis to header row 2. Merge both cells in rows 2 and 3, respectively. Move your Revenue and Sales Forecast measures into their respective body axis cells and delete the empty column from the horizonatl axis. Note that your vertical axis will now be empty. Remove the column via right-clicking:

Your first table block now looks like this:

Now, apply some more formatting. Select all cells and go to Format Cell:
Next, you need to add a custom sort to [Day Name] in the table block to achieve the desired start day and date. In this case we start our weeks on Sunday. Therefore create your custom sort in ascending order with
Format the table layout to move it horizontally to 0.5 cm from the Left of Report, and vertically 0.5 cm from the Top of Report.
We are now getting to the stage where you simply duplicate the table blocks (copy and paste), and aligning them right underneath one another before adjusting the filters. You will need six table blocks in total. Once you have applied the formatting to each block you will need to adjust the table filters for each block as follows:
Your report now looks like this:

We are now getting very close. Next, you need to create the dummy table to adjust the table alignment of your first block. Copy one of the table blocks and clear the contents from all cells as well as the filter that sits on the copied block. Add [DayOffset] from your second query to the block and then apply a filter on table: [Dummy Table Adjust] Is not null:

Readjust the width of the table cells in the dummy block to 2 cm and then adjust the positioning of the dummy table block to place it in front of your top table block, i.e. Format Table to move it horizontally to 0.5 cm from the Left of Report, and vertically 0.0 cm from the Top of Report. Then adjust your top table block position to 0 cm from the Right edge of the dummy table.
You are now almost there!
Apply the final touches by deleting all but the [DayOffset] row and one other row from the dummy table. Then remove the borders from the cells, remove any background colors and set the font color to White. Your top table block is now perfectly aligned. No matter what day your month starts, the top calendar block will always start in perfect alignment:

Last but not least apply "Hide when empty" General Display formatting to you first, last and the dummy table blocks. Then go to Page Setup, change the Page mode to Landscape and adjust your margins to fit the full "calendar" on one page. With the cell sized in this example reduce the left and right margins to 0.3cm.
Voila!

Kind regards,
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.