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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mturcotte_epq
Advocate I
Advocate I

Further Filtering AFTER ALLSELECTED

I'm struggling with a measure where ALLSELECTED provides me with a table containing the rows I need, but I need to apply some further filtering on it before I can apply CALCULATE to compute the total of visit duration (Table AgentActivities).

 

My issue is that sometimes after having selected the DATE and the AGENT_ID, some visits are spread over more than one row all sharing the same DATE, AGENT_ID, VISIT_ID and each having the same DURATION_IN_SECONDS for that same combination of DATE, AGENT_ID and VISIT_ID but each row with have a different description of ACTIONS_TAKEN.

 

Total duration of daily visits =
CALCULATE (
SUM( 'AgentActivities'[DURATION_IN_SECONDS] );
ALLSELECTED ( 'AgentActivities' )
)
 
The above measure works fine for all those cases wher there are no duplicated DATE, AGENT_ID, VISIT_ID, DURATION_IN_SECONDS.
 
So, I tried the following in an attempt to remove the 'AgentActivities'[ACTIONS_TAKEN] and hoping that then the duplicates sharing the same DATE, AGENT_ID, VISIT_ID and DURATION_IN_SECONDS would only show once so that the SUM would not include the duplicates.
 
Total duration of daily visits =
CALCULATE (
SUM( 'AgentActivities'[DURATION_IN_SECONDS] );
ALLEXCEPT ( 'AgentActivities'; 'AgentActivities'[ACTIONS_TAKEN] )
)
 
I don't have a report I could share at this point.
 
Any suggestions will be appreciated!
0 REPLIES 0

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors