Forum Discussion
Bastaba
7 years agoFrequent Visitor
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...
- 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.
Best Regards,
Dale
Bastaba
7 years agoFrequent Visitor
What formula do i have to write for GROUP_DATA please ?
Regards,
v-jiascu-msft
7 years agoMicrosoft Employee
Maybe this one?
GROUP_DATA = IF ( DATEDIFF ( 'Date'[Date]; TODAY (); DAY ) > 30; "<D-20"; IF ( DATEDIFF ( 'Date'[Date]; TODAY (); DAY ) >= 20; "D-20"; IF ( DATEDIFF ( 'Date'[Date]; TODAY (); DAY ) >= 10; "D-10"; IF ( DATEDIFF ( 'Date'[Date]; TODAY (); DAY ) > 0; "-D"; IF ( DATEDIFF ( 'Date'[Date]; TODAY (); DAY ) = 0; "D"; ">D" ) ) ) ) )
Best Regards,