Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am computing values in Power Bi using the ISINSCOPE function but not getting the expected result in my total.
As the image above shows, my values come out correctly in rows but not in the group total or grand total.
I have a measure like so:
Planned Session Duration =
IF (
ISINSCOPE( DeltaRoom[DeltaRoomCode] ) && ISINSCOPE( xDate[Date] ),
CALCULATE( MAX( 'Isinscope'[PlannedSessionDuration] ) ), -- get the max planned session duration for this scope
IF (
ISINSCOPE( Consultant[ConsultantKey] ) && ISINSCOPE( xDate[Date] ),
CALCULATE( MAX( 'Isinscope'[PlannedSessionDuration] ) ), -- get the max planned session --duration for this scope
IF (
ISINSCOPE( Agency[AgencyName] ) && ISINSCOPE( xDate[Date] ),
CALCULATE( MAX( 'Isinscope'[PlannedSessionDuration] ) ), -- get the max planned session duration for this scope
VAR _PlannedSession =
SUMMARIZE(
'Isinscope',
'Isinscope'[Date],
"PlannedSessionDuration", MAX( 'Isinscope'[PlannedSessionDuration] ) -- get the max value for the scope
)
RETURN
SUMX( _PlannedSession, [PlannedSessionDuration] ) -- return the sum of the max value from the variable to get the total
)
)
)
Not sure where I am getting it wrong. What I hope to achieve is to get the MAX value of PlannedSessionDuration for each row. The MAX value of each row should be summed up as the total per group in the scope so Efficiency is computed like so:
Efficiency =
DIVIDE(
[Planned Duration(Mins)],
[Planned Session Duration]
)
I have attached the file here(.pbix and data file)
I really appreciate any help you can provide.
xDate[Date] is never in scope as it is not shown in the visual. Therefore always only the last formula is executed.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
106 | |
75 | |
44 | |
39 | |
33 |
User | Count |
---|---|
165 | |
90 | |
65 | |
46 | |
43 |