Forum Discussion
Find different from accumulate data by time
Hi guys,
I just got a covid-19 data from CSSE
https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data?fbclid=IwAR2Qgwi5nNJ5LFs9sQ5EEbwejA7dwAkuHTa2FpChn3g7uek9hx4ngFa444U
Which contain accumulate data (as 1st image ) and i want to show data like the 2nd image. any clue for this?
3 Replies
- amitchandakSuper User
You can Today's number like this
today number = calculate(sum(value),'Date'[date]) - calculate(sum(value),datediff('Date'[date],-1,day)) //OR today number = calculate(sum(value)) - calculate(sum(value),datediff('Date'[date],-1,day)) - Greg_DecklerCommunity Champion
So where did that second image come from? Can you share a bit of your data in text as it looks like you have done quite a bit of clean-up on it based on what I saw of the raw data.
You want a column and line chart, that is for certain. It looks like there are two measures involved, one for the columns and one for the line. I am assuming this is using the disconnected table trick or something similar based on the names to display either deaths, recovery, etc. Looks like the line displays the sum over time and the columns the individual day amounts. The axis could be easily achieved by using a date hiearchy with month and day. To get the column from aggregated data, simply do something like:
Column Value =
VAR __Date = MAX('Table'[Date])
VAR __Sum = SUM('Table'[Column])VAR __Yesterday = SUMX(FILTER(ALL('Table'),[Date] = (__Date - 1) * 1.),[Column])
RETURN
__Sum - __YesterdaySo, not sure exactly what part you are having trouble with, can you clarify?
- v-diye-msftCommunity Support
Hi noppadolr
If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!