I have put report page tool tips on my dashboard to enable users to see details of a KPI amount broken down by item/product name as follows:
The tooltip uses a play axis to iterate through the first 10 pages of the tooltip based on ranking of 'Total Dispensed Amount RPT'. The total always shows the same figure of $2, 220,317.53 calculated using the following measure:
Total Dispensed Amount RPT =
IF(
ISINSCOPE(PharmaAuditGWFourth[Item]),
SUMX(PharmaAuditGWFourth, PharmaAuditGWFourth[Amount Dispensed]),
CALCULATE(SUMX(PharmaAuditGWFourth, PharmaAuditGWFourth[Amount Dispensed]),ALL(PharmaAuditGWFourth[Item]))
)
I now need to apply the same principle on Month to Date (MTD) Figures with the following Report Page Tooltip:
The following measure is used to calculate the figures in the column MTD Dispensed Amount:
MTD Dispensed Amount = CALCULATE([Total Dispensed Amount],
DATESMTD(AuditCalendar[Date]))
where Total Dispensed Amount = SUM(PharmaAuditGWFourth[Amount Dispensed])
Using this measure will give the total figures of the items in the current page showing in the tooltip as the pages iterate from page 1 to 10 using play axis visual.
I then try and replicate the behaviour in the first example (where the total figure is shown always) using the following measure instead of the simple measure above:
Total Dispensed Amount MDT RPT =
IF(
ISINSCOPE(PharmaAuditGWFourth[Item]),
SUMX(PharmaAuditGWFourth, [MTD Dispensed Amount]),
CALCULATE(SUMX(PharmaAuditGWFourth, [MTD Dispensed Amount]), ALL(PharmaAuditGWFourth[Item]))
)
The above measure is wrong as there is some double calculation with SUMX and the already summed measure "MTD Dispensed Amount". Kindly assist with the correct measure.
Best regads,
Chris