Forum Discussion

elinevans's avatar
elinevans
Helper I
4 years ago

Values different on table/graph visuals

I'm trying to figure out the % of sessions that clients have missed. When calculating this in a table the results are correct, but when I put it in a graph visual it states the precentage a lot lower just on the month of feburary. I've found out that this is due to 3 sessions on the 28th of Feb not being included in the calculation. Can someone please advise? The data type is time/date, I can't change this to just date as I need the time to be referenced elsewhere on the dashboard.

 

 

3 Replies

  • %FirstSessionDNA = divide([CountDNAFirstSessions], [CountAllFirstSessions])
     
    CountAllFirstSessions = CALCULATE(count(Sessions2[Reference]),FILTER(Sessions2, Sessions2[Start] <=max(DateTable[Date]) && Sessions2[Start] >= min(DateTable[Date]) && Sessions2[FirstSession]=1))
     
    CountDNAFirstSessions = CALCULATE(count(Sessions2[Reference]), filter(Sessions2, Sessions2[SessionOutcome] = "Did Not Attend (DNA)"),FILTER(Sessions2, Sessions2[Start] <=max(DateTable[Date]) && Sessions2[Start] >= min(DateTable[Date]) && Sessions2[FirstSession]=1))
     
     
     
    Where Sessions2[FirstSession]=1 just incidcates that it's the first session per client. And the DateTable is just a calendar table which is used on a slicer. 
     
    Unfortunately it's really hard to give the exact data as it has a lot of sensitive data however it's in the following format:
    Client IDRefernceStartFirstSessionSession outcome
    123415275687302/02/22 15:001Did not attend (DNA)
    1234272348705/02/2022 17:000Attended
    859473545965456406/05/20211Attended
  • When in the table visual it shows the activities that occured on the 28th Feb, but when I look at the 'raw' data nothing comes up when the table is filtered to the 28th feb. I'm very confused and feel I'm going insane