Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem with a line chart that I didn´t think should be so difficult but I can´t seem to make it work. I will try to explain....
I have a table like this:
date | value |
2019-01-01 | A |
2019-01-01 | A |
2019-01-01 | B |
2018-12-01 | C |
2018-12-01 | B |
2018-11-01 | A |
2018-11-01 | B |
2018-11-01 | D |
2018-10-01 | E |
2018-09-01 | A |
2018-09-01 | B |
2018-09-01 | C |
I want to calculate the number of distinct values in each Date like this....:
Date | NrOfDistinctValues |
2019-01-01 | 2 |
2018-12-01 | 2 |
2018-11-01 | 3 |
2018-10-01 | 1 |
2018-09-01 | 3 |
and then I want to plot out the sum of two dates, the date on the row and 2 rows below, and dived it by 2 in a line chart. The x-axis is Date and the value on the dot should be like this. I actually want the sum to be between one date and 12 months earlier, but I don´t want to do such a big table).
Date | Value on dot | |
2019-01-01 | The value of date( 2019-01-01 + 2018-11-01)/2 (eg 2+3/2) | 2,5 |
2018-12-01 | The value of date( 2018-12-01 + 2018-10-01)/2 (eg 2+1/2) | 1,5 |
2018-11-01 | The value of date( 2018-11-01 + 2018-09-01)/2 (eg 3+3/2) | 3 |
Is this possible? And if so: How do I do this?
Problem solved. I used the wrong date in the line chart. I´m using AsOf-table
to calculate the number of distinct values in each Date:
Create a table
Dimension: Date
Measure: Count(Distinct value)
That is not the problem. I know how to calculate the distinct value, but the problem is the last piece where I want to have the average between to dates in a line chart
Problem solved. I used the wrong date in the line chart. I´m using AsOf-table