Forum Discussion
line graph for 3 months
- 6 years ago
hi Anonymous
First, to create a dim date table, you should do it as below:
https://radacad.com/do-you-need-a-date-dimension
Calendar = ADDCOLUMNS( CALENDARAUTO(), "Year", YEAR ( [Date] ), "Month", MONTH ( [Date] ), "MonthName", FORMAT ( [Date], "MMMM" ) )then 'Query1'[Call Closed] column is a datetime column, so please add two column
Call Closed Date = DATE(YEAR(Query1[Call Closed]),MONTH(Query1[Call Closed]),DAY(Query1[Call Closed]))Call Closed Month = MONTH(Query1[Call Closed])By the way, in this case, create relationship by [Call Closed Date] column instead of [Call Closed] column
Now create measure as below to get your requirement:
past 2 and current month RAW COUNT = CALCULATE ( [RAW COUNT], DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), -3, MONTH ) )result:
and here is sample pbix file, please try it.
Regards,
Lin
hi Anonymous
First, to create a dim date table, you should do it as below:
https://radacad.com/do-you-need-a-date-dimension
Calendar = ADDCOLUMNS( CALENDARAUTO(),
"Year", YEAR ( [Date] ),
"Month", MONTH ( [Date] ),
"MonthName", FORMAT ( [Date], "MMMM" )
)
then 'Query1'[Call Closed] column is a datetime column, so please add two column
Call Closed Date = DATE(YEAR(Query1[Call Closed]),MONTH(Query1[Call Closed]),DAY(Query1[Call Closed]))Call Closed Month = MONTH(Query1[Call Closed])
By the way, in this case, create relationship by [Call Closed Date] column instead of [Call Closed] column
Now create measure as below to get your requirement:
past 2 and current month RAW COUNT =
CALCULATE (
[RAW COUNT],
DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), -3, MONTH )
)
result:
and here is sample pbix file, please try it.
Regards,
Lin
Hii lin
dis works ok for me
i want my count of call closed also to be dosplayed in my line graph in the same month sequence
as in this figure how can i do that