Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Build a string from a filter selection

Hi,   I am trying to build a string every time I make a selectiong from a filter I added from a table I added see the table below   The month the month that is selected in the filter must return ...
  • v-xulin-mstf's avatar
    4 years ago

    Hi Anonymous,

     

    Create slicer table as:

    Slicer = 
    VALUES('Table'[Month Num])

    Create column as:

    Column = 
    CALCULATE(
        MAX('Table'[Month Num]),
        FILTER(
            'Table',
            'Table'[Month Short]=EARLIER('Table'[Month Short])-1
            )
        )

    Create measure as:

    Measure = 
    var _month=
    CALCULATE(
        MAX('Table'[Column]),
        FILTER(
            'Table',
            'Table'[Month Num]=ALLSELECTED(Slicer[Month Num])
        )
    )
    return
    CONCATENATE(_month,"FCST")

    Here is the output:

    The demo is attached, please try it.

     

    If you still have some question, please don't hesitate to let me known.‌‌

     

    Best Regards,

    Link

     

    Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!