Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
not sure if this is possible but here goes... I'm reading in an Excel sheet that is formatted like this …
i.e. 3 areas with daily check and result which gets updated with 3 new rows every day and Loaded into QV daily.
Area | Date | Result |
A1 | 2021-01-01 | 1 |
A2 | 2021-01-01 | 3 |
A3 | 2021-01-01 | 6 |
A1 | 2021-01-02 | 3 |
A2 | 2021-01-02 | 7 |
A3 | 2021-01-02 | 9 |
A1 | 2021-01-03 | 6 |
A2 | 2021-01-03 | 5 |
A3 | 2021-01-03 | 1 |
... | ... | ... |
Requirement to create chart that shows Area as dimension and expressions with the value of each reading for the previous 3 days
I've created a Generic Load which reformats the table like this for the 3 days … so each day the table is recreated
where by the oldest date drops off and the current date is added as fieldname.
Area | 2021-01-01 | 2021-01-02 | 2021-01-03 |
A1 | 1 | 3 | 6 |
A2 | 3 | 7 | 5 |
A3 | 6 | 9 | 1 |
As the field names change every day, is there a way to rename the fields Day1 Day2 Day3, or refer to them by index or something, to be so that these can be used as expressions in a chart?
I wouldn't do this generic load else using a pivot-table within the UI to display your wanted view. The replacement of the changeable date-values could be done within the master-calendar, maybe with something like this:
'Day ' & today() - datefield as DayFromToday
- Marcus
Thanks Marcus, definitely gave me a different option to think about.
Taking your suggestion into consideration I used a variable to calculate the Today ... Today-1 Today-2 and then used that as criteria on Loads, concatenating the result tables to give the Days as expressions with fixed headings to use in my chart.