Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chitemerere
Responsive Resident
Responsive Resident

Report Page Tooltip Calculations Normal Sum vs Month to Date Values

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:

 

RPTItemYTD.JPG

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:
 
RPTItemMTD.JPG

 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
1 ACCEPTED SOLUTION
Chitemerere
Responsive Resident
Responsive Resident

Thank you all who had a view at my posting. Managed to the following measure:

 

Total Dispensed Amount MDT RPT2 =
IF(
ISINSCOPE(PharmaAuditGWFourth[Item]),
[MTD Dispensed Amount],
CALCULATE([MTD Dispensed Amount], ALL(PharmaAuditGWFourth[Item])
) )
 
Best regards,
Chris

View solution in original post

1 REPLY 1
Chitemerere
Responsive Resident
Responsive Resident

Thank you all who had a view at my posting. Managed to the following measure:

 

Total Dispensed Amount MDT RPT2 =
IF(
ISINSCOPE(PharmaAuditGWFourth[Item]),
[MTD Dispensed Amount],
CALCULATE([MTD Dispensed Amount], ALL(PharmaAuditGWFourth[Item])
) )
 
Best regards,
Chris

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.