The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a 1 column table that are just dates an event happened. Each row (date) represents 1 event. Sometimes the same date is listed on multiple rows if an event happened multiple times on that date. Some rows are blank or have 'null' in them. Those are not important for the calculation and must be ignored.
Intended result: I would like to build a visual of a line chart. Y axis: number of events, x axis: date with the line showing a cumulative total of events as time progresses.
sample date table:
Event Date
1/2/2023
null
1/3/2023
1/5/2023
1/5/2023
2/1/2023
2/9/2023
2/9/2023
3/1/2023
3/19/2023
Hi,
After cleaning the data, load the data into the Data model. Create a Calendar Table and build a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table. To your visual, drag the Date column from the Calendar Table. Write these measures:
Count = countrows(Data)
Cumulative count = calculate([count],datesbetween(calendar[date],minx(all(calendar),calendar[date]),max(calendar[date])))
Hope this helps.
The best way would be to go back into power query and clean your data - to remove the null and blank rows, you can simply click on the down arrow and then "Remove Empty"
Change the type of your column to Date, and then you can Close and Apply.
To create the chart, drag the date to both the x and y axis, and it should automatically agreggate the count per day.