Forum Discussion
sabilahmed
3 years agoResolver I
Measure in Live Connection - Incorrect Total
Hello, I know there have been many solutions on incorrect totals from measures in Live Connection, but I can't seem to figure out the solution for my measure: No of Sessions =
VAR _enco...
- 3 years ago
Solved! I used ADDCOLUMNS and SUMMARIZE:
No of Sessions = VAR SessionsTable = ADDCOLUMNS ( SUMMARIZE ( 'Location-Practice-Rendering', 'Location-Practice-Rendering'[LeafName] ), "Total Encounters", [Encounters], "No of Days Total", [No of Days], "No of Sessions Per Day", IF ( [Encounters] <= 2, 0, IF ( [Encounters] > 10, 2, 1 ) ) ) RETURN SUMX( SessionsTable, [No of Days Total] * [No of Sessions Per Day])Where [Encounters] and [No of Days] are separate measures:
Encounters = CALCULATE ( [Amount], FILTER ( ALL ( 'Profitability Account' ), 'Profitability Account'[Description] = "Encounters" ))No of Days = CALCULATE ( DISTINCTCOUNT ( 'Time'[CalendarDate]), FILTER ( 'Time', 'Time'[DayOfWeekdayDescription] <> "Sunday" && 'Time'[DayOfWeekdayDescription] <> "Saturday" ) )Results:
(Doctor Days is simply a measure: No of Sessions divided by 2).
tamerj1
3 years agoCommunity Champion
Hi sabilahmed
Location, Practice and Rendering Name from which table(s)? If multiple tables are involved in this visual, would you please advise the relationships?
sabilahmed
3 years agoResolver I
Hi tamerj1
The Location Practice and Rendering Name doesn'y matter because when I put the measure in a card alone I still get the wrong total. See below:
So you can see the Total issue has nothing to do with the Locations column.
These are the key relationships. Remember, this is a Live Connection Analysis Services:
Let me know if you need anything else. And thank you for your support 🙂