Forum Discussion
gauravnarchal
6 years agoPost Prodigy
Calculate Due date / Statement Date
Hello All I need your help in creating a measure from the below table. Requirment If statement group is "M" result = EOMONTH + 1 + credit days Example If statement group is "M" & Credit d...
- 6 years ago
Hi gauravnarchal ,
Create a measure as below:
Measure = SWITCH ( MAX ( 'Table'[statement group] ), "M", EOMONTH ( MAX ( 'Table'[invoice date] ), 0 ) + 1 + MAX ( 'Table'[credit days] ), "F", IF ( DAY ( MAX ( 'Table'[invoice date] ) ) <= 15, DATE ( YEAR ( MAX ( 'Table'[invoice date] ) ), MONTH ( MAX ( 'Table'[invoice date] ) ), 15 ) + 1 + MAX ( 'Table'[credit days] ), EOMONTH ( MAX ( 'Table'[invoice date] ), 0 ) + 1 + MAX ( 'Table'[credit days] ) ) )And you will see:
For the related .pbix file ,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
v-kelly-msft
6 years agoCommunity Support
Hi gauravnarchal ,
Create a measure as below:
Measure =
SWITCH (
MAX ( 'Table'[statement group] ),
"M",
EOMONTH ( MAX ( 'Table'[invoice date] ), 0 ) + 1
+ MAX ( 'Table'[credit days] ),
"F",
IF (
DAY ( MAX ( 'Table'[invoice date] ) ) <= 15,
DATE ( YEAR ( MAX ( 'Table'[invoice date] ) ), MONTH ( MAX ( 'Table'[invoice date] ) ), 15 ) + 1
+ MAX ( 'Table'[credit days] ),
EOMONTH ( MAX ( 'Table'[invoice date] ), 0 ) + 1
+ MAX ( 'Table'[credit days] )
)
)
And you will see:
For the related .pbix file ,pls see attached.
Best Regards,
Kelly
Kelly
Did I answer your question? Mark my post as a solution!