hello. I have a question but, I am not good at English. So the sentence can be awkward because you are using a translator.
I want to compare two periods in one graph . A parameter was used so that the dashboard viewer could freely set the period. At first, I tried to express it as a simple line graph, but found that I couldn’t set more than two periods on the X-axis. So, according to the length of the given period, D, D+1 … D+diff (periodstart,periodend) and the values corresponding to each date are created as a calculated field. However, it seems that the loop statement does not exist in the provided function. Is there any way to solve this?
Thank you for your reply. I read the articles you said and practiced it, but I don’t think I conveyed what I wanted properly. The article you provided explains how you can calculate and display the difference between a given period and a certain number of days before (Year, Quarter, Month, Day). What I want is not a difference between a period and a period, but a way to express a period and a period at the same time.
Both of these two periods can be set arbitrarily by the viewer, and even the two periods can overlap to some extent, such as 7/1 to 7/5 and 7/3 to 7/8. So, the way I thought of is to replace the two periods with D, D+1, D+2… to match the X-axis, and to draw a line graph of the values for each period on the y-axis, that is, period 1_value, period 2_value will. Of course, if the value of the two periods can be expressed simultaneously in another method, it does not matter if it is not this method. Could this be possible?
visualize these calculated fields, It becomes group by with combined_period
then will look like this :
It’s crude, but I made the shape I wanted
next step, i want
I want to express the difference between the two columns. In the visualization object, it looks like the same row because it’s group by but, it’s not same row. is it possible?
it will not work properly if the two periods include the same day (for example, December 1st to December 5th, December 4th to December 8th).
if that is, why not creating calc field to get the difference and set into the same visual you created for the table of combined_period and each aggregated values?