Forum Discussion
Poor Measure Performance and Confusion
Hey vgeldr,
Maybe try:
FirstMonth =
VAR Filtered =
CALCULATETABLE (
VALUES ( 'CTE YTD Excel Report (ServiceNow)'[Usage Month] ),
ALLEXCEPT ( 'CTE YTD Excel Report (ServiceNow)'[GPN] )
)
VAR Result =
MINX (
Filtered,
'CTE YTD Excel Report (ServiceNow)'[Usage Month]
)
RETURN
Result
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
- vgeldbr2 years agoHelper IV
- Wilson_2 years agoMemorable Member
vgeldbr,
That definitely is a problem. I think I'd left the engagement number out of the ALLEXCEPT.
FirstMonth = VAR Filtered = CALCULATETABLE ( VALUES ( 'CTE YTD Excel Report (ServiceNow)'[Usage Month] ), ALLEXCEPT ( 'CTE YTD Excel Report (ServiceNow)'[GPN], 'Engagemenet Code Full'[ENGAGEMENT_NUM] ) ) VAR Result = MINX ( Filtered, 'CTE YTD Excel Report (ServiceNow)'[Usage Month] ) RETURN ResultIf that is still not giving the right answer (I'm not always great at writing code in just my head hah) or faster, I would personally try pulling the user data out into its own dimension table and try something like:
FirstMonth = MIN ( ALL ( 'CTE YTD Excel Report (ServiceNow)'[Usage Month] ) )
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)- vgeldbr2 years agoHelper IV
Wilson_ thanks again but not luck. Note that ALLEXCEPT requires Table and Column as parameters so you cannot include colums from two different tables. I tried adding two ALLEXCEPT (one for each table/column) but that did not work either.
Your second option also does not work as MIN only accepts a column reference as an argument at ALL generates a table.