Forum Discussion
HugoJesus
5 years agoHelper IV
Cumulative Using Summarized Data by x-axis visualizations
Hello everyone, I've the follow table with summarized data, but it's working fine with a table, but I want to show the column Open_Tickets by Calendar in x-axis visualization, this is possible? ...
Fowmy
5 years agoSuper User
HugoJesus
Try this code please:
Total_Open_Tickets =
VAR TempTable =
SUMMARIZE (
Date_Link,
Date_Link[Calendar],
"Created_Tickets",
CALCULATE (
COUNT ( Date_Link[id] ),
FILTER ( Date_Link, Date_Link[Date_Type] = "Creation" )
),
"Closed_Tickets",
CALCULATE (
COUNT ( Date_Link[id] ),
FILTER ( Date_Link, Date_Link[Date_Type] = "Closure" )
),
"Daily_Open_Tickets",
CALCULATE (
COUNT ( Date_Link[id] ),
FILTER ( Date_Link, Date_Link[Date_Type] = "Creation" )
)
- CALCULATE (
COUNT ( Date_Link[id] ),
FILTER ( Date_Link, Date_Link[Date_Type] = "Closure" )
)
)
VAR LastDay =
MAX ( Date_Link[Calendar] )
VAR TempTable2 =
ADDCOLUMNS (
TempTable,
"Open_Tickets",
VAR _date = [Calendar]
RETURN
SUMX ( FILTER ( TempTable, [Calendar] <= _date ), [Daily_Open_Tickets] )
)
RETURN
ADDCOLUMNS(
TempTable2,
"Cummulative",
SUMX( FILTER(TempTable2, Date_Link[Calendar] <= EARLIER(Date_Link[Calendar])), [Daily_Open_Tickets])
)________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂