Forum Discussion
elinevans
4 years agoHelper I
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...
elinevans
4 years agoHelper I
%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 ID | Refernce | Start | FirstSession | Session outcome |
| 1234 | 152756873 | 02/02/22 15:00 | 1 | Did not attend (DNA) |
| 1234 | 2723487 | 05/02/2022 17:00 | 0 | Attended |
| 8594 | 735459654564 | 06/05/2021 | 1 | Attended |