Forum Discussion

Bastaba's avatar
Bastaba
Frequent Visitor
7 years ago
Solved

Parameter Personnalized Column

Hi everyone, I created a personnalized column in order to creat 4 group of my column 'Date'.   Formula : GROUP_DATA = IF(DATEDIFF(FBL5N[Date d'échéance];TODAY();Month)>2;"<M-2";IF(DATEDIFF(FBL...
  • v-jiascu-msft's avatar
    v-jiascu-msft
    7 years ago

    Hi Bastaba,

     

    Yes, it has to be a column that provides the context while a measure can't. 

    I have created a workaround. Please download it from the attachment. 

    1. Create an independent table [Days].

    2. Create a measure.

    Measure =
    VAR month_offset =
        DATEDIFF ( SELECTEDVALUE ( Days[Date] ), TODAY (), MONTH )
    RETURN
        CALCULATE (
            SUM ( 'Table_Paramètre_Date_Jour'[Value] ),
            DATEADD ( FBL5N[Date d'échéance], - month_offset, MONTH )
        )
    

    3. Please refer to the snapshot below.

    Parameter-Personnalized-Column

     

    Best Regards,
    Dale