Forum Discussion
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(FBL5N[Date d'échéance];TODAY();Month)=2;"M-2";IF(DATEDIFF(FBL5N[Date d'échéance];TODAY();Month)=1;"M-1";IF(DATEDIFF(FBL5N[Date d'échéance];TODAY();Month)=0;"M";">M"))))
So my data is classified according to the date of the day.
I would like to switch the day's date to a variable in order to change my visualization in my report.
I know i can do that through parameter in the 'data' part but i want to do that easily in my 'report' part.
I tried to creat a measure :
Day_Selected = SELECTEDVALUE('Table_Paramètre_Date_Jour'[Date];TODAy())
and to put my variable in the GROUP DATA's formula but it didn't work.
COuld You help me please ?
Regards ,
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.
Best Regards,
Dale
9 Replies
- v-jiascu-msftMicrosoft Employee
Hi Bastaba,
I'm afraid we can't do it like that. The GROUP_DATA is a calculated column that can't respond to the slicer. How would you like to change the visualization? Can you share sample data, please?
It seems the GROUP_DATA could be in the X-axis. The workaround could be making the value dynamic.
Best Regards,
Dale- BastabaFrequent Visitor
Hi,
Yes this is actually in the X-Axis.
I just want to change my filter and so the day-selected variable change the X-axis.
Here, some pictures to illustrate what i want :I know how to make this works for a measure but not for a personnalized column.
But if i want to put it in my X-axis, it has to be a Column and not a measure, isn'it ?Thx,
- v-jiascu-msftMicrosoft Employee
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.
Best Regards,
Dale