Forum Discussion

Ishmale's avatar
Ishmale
Icon for Helper I rankHelper I
3 years ago
Solved

Display Multiple Months selected by Slicer on Data Card: Date Table created by DAX

Hello,

 

I am trying to display multiple Months selected by a slicer on a data card. I have created a date table starting from 1/1/23 ending 12/31/23. I have a slicer that selects based on month, on my drill through page I would like to see the data card show the months I have selected in the slicer. I have multiple tables connected to the date table.

 

 

 

I tried accomplishing this with the ConcatenateX {x}. I created a new measure for the datetable using the following;

MultiMonthCard =
CONCATENATEX(DateTable, DateTable[Date].[Month], ",")
 
However the result was the following:

 

 

The card displays the Month Multiple times, it displays the month repeatedly, to be exact it repeat the exact amount of days in that month, in this instance it displays January 31 times and then February 28 times.  
I have tried wrapping DateTable[Date].[Month] in DISTINCT() to try and only extrapolate the month only once but still cannot complete the objective I am trying to achieve, I tried a couple other functions like SELECTEDVALUE() but still can't find the right way to accomplish it, 
I also tried creating a month column on my datetable turning 1/1/23 into January and so forth and using the Month column on the on the slicer.

 

Any support would be appreciated.

 

 

 

  • Hi Ishmale 

     

    What if you try to do:

    MultiMonthCard =
    CONCATENATEX(VALUES(DateTable[Date].Month), DateTable[Date].[Month], ",")

3 Replies

  • mlsx4's avatar
    mlsx4
    Icon for Memorable Member rankMemorable Member

    Hi Ishmale 

     

    What if you try to do:

    MultiMonthCard =
    CONCATENATEX(VALUES(DateTable[Date].Month), DateTable[Date].[Month], ",")
    • Ishmale's avatar
      Ishmale
      Icon for Helper I rankHelper I

      THANK YOU, MLSX4!

       

       

      But why did wrapping the column in Values() work when Distinct() did not?

      • mlsx4's avatar
        mlsx4
        Icon for Memorable Member rankMemorable Member

        Hi Ishmale 

         

        I think that it should work if you do this:

        MultiMonthCard =
        CONCATENATEX(DISTINCT(DateTable[Date].Month), DateTable[Date].[Month], ",")

         The problem is that you probably wrapped the second parameter