Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

DAX Measure - Error not returning date seelcted

Hi Experts

 

The following measure returns all the other selected sclier - apart from the discharge date not sure where the error is in the DAX.

Referrals Selection =
IF(ISFILTERED('SWICCData'[datedischarged])," | Year> " & CONCATENATEX(FILTERS('SWICCData'[datedischarged]),'SWICCData'[datedischarged],", ")) &
IF(ISFILTERED('SWICCData'[Practice_Name])," | Service> " & CONCATENATEX(FILTERS('SWICCData'[Practice_Name]),'SWICCData'[Practice_Name],", ")) &
IF(ISFILTERED('SWICCData'[WARD])," | Reportable Contract> " & CONCATENATEX(FILTERS('SWICCData'[WARD]),'SWICCData'[WARD],", ")) &
IF(ISFILTERED('SWICCData'[AreaCode])," | Reportable Contract> " & CONCATENATEX(FILTERS('SWICCData'[AreaCode]),'SWICCData'[AreaCode],", ")) &
IF(
NOT(ISFILTERED ( 'SWICCData'[datedischarged])) &&
NOT(ISFILTERED ( 'SWICCData'[Practice_Name])) &&
NOT(ISFILTERED ( 'SWICCData'[WARD])) &&
NOT(ISFILTERED ( 'SWICCData'[AreaCode]))
,"NO SELECTIONS APPLIED")

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi All

     

    I have managed to modify the DAX - I get the YEAR and The Correct QUARTER but the issue now is when i Select YEAR 2022, QRT (Q1) - i get all the months of the year as opposed to just the months that relate to Q1 (JAN, FEB, MAR)


    Referrals Selection =
    IF(ISFILTERED('SWICCData'[datedischarged].[Year]) || ISFILTERED('SWICCData'[datedischarged].[Quarter]) || ISFILTERED('SWICCData'[datedischarged].[Month])," | Year> " & CONCATENATEX(FILTERS('SWICCData'[datedischarged].[YEAR]),'SWICCData'[datedischarged].[Year],", ")) &" "& CONCATENATEX(FILTERS('SWICCData'[datedischarged].[Quarter]),'SWICCData'[datedischarged].[Quarter],", ") &" "& CONCATENATEX(FILTERS('SWICCData'[datedischarged].[Month]),'SWICCData'[datedischarged].[Month],", ") &
    IF(ISFILTERED('SWICCData'[Practice_Name])," | Service> " & CONCATENATEX(FILTERS('SWICCData'[Practice_Name]),'SWICCData'[Practice_Name],", ")) &
    IF(ISFILTERED('SWICCData'[WARD])," | Reportable Contract> " & CONCATENATEX(FILTERS('SWICCData'[WARD]),'SWICCData'[WARD],", ")) &
    IF(ISFILTERED('SWICCData'[AreaCode])," | Reportable Contract> " & CONCATENATEX(FILTERS('SWICCData'[AreaCode]),'SWICCData'[AreaCode],", ")) &
    IF(
    NOT(ISFILTERED ( 'SWICCData'[datedischarged].[Year]) || ISFILTERED('SWICCData'[datedischarged].[Quarter]) || ISFILTERED('SWICCData'[datedischarged].[Month])) &&
    NOT(ISFILTERED ( 'SWICCData'[Practice_Name])) &&
    NOT(ISFILTERED ( 'SWICCData'[WARD])) &&
    NOT(ISFILTERED ( 'SWICCData'[AreaCode]))
    ,"NO SELECTIONS APPLIED")
  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi Anonymous 

    Thanks for reaching out to us.

    Could you share a sample .pbix file for us to check? thanks.

     

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Apologies cannot upload a PBIX - as it's not allowed..sorry