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
drwinny
Helper I
Helper I

Dax Measure Help

Hi All, 

I created this measure to tell me how many technical escalations have been open (confirmed) for more than 30 days but less than 60 days

[StatusCodeName] = "confirmed" means the item is open

[DaysOpen] = is the number of days the item has been open for

 

When I used this code in a card visual it shows a total (that looks correct) but when it's added to a table, I get this error.

 

MdxScript(Model) (173, 3) Calculation error in measure 'vwTechnicalEscalations'[*TE OPEN more than 30 less than 60 days]: SummarizeColumns() and AddMissingItems() may not be used in this context.

 

*TE OPEN more than 30 less than 60 days = 

  VAR __DS0FilterTable = 
    TREATAS({"Confirmed"}, 'vwTechnicalEscalations'[statuscodename])

  VAR __DS0FilterTable2 = 
    FILTER(
      KEEPFILTERS(VALUES('vwTechnicalEscalations'[DaysOpen])),
      AND(
        'vwTechnicalEscalations'[DaysOpen] >= 31,
        'vwTechnicalEscalations'[DaysOpen] <= 60
      )
    )

  VAR __DS0FilterTable3 = 
    FILTER(
      KEEPFILTERS(VALUES('DimDate'[FullDateAlternateKey])),
      'DimDate'[FullDateAlternateKey] >= DATE(2019, 1, 1)
    )

Return
  SUMMARIZECOLUMNS(
    __DS0FilterTable,
    __DS0FilterTable2,
    __DS0FilterTable3,
    "v_Total_Escalations", IGNORE('vwTechnicalEscalations'[*Total Escalations])
  )

 

Can someone help me change the measure so it can be used in a table, please?

 

Thanks,

 

Sean

 

1 REPLY 1
Anonymous
Not applicable

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.

Top Solution Authors