Forum Discussion
Analitika
5 years agoPost Prodigy
If date between months
How to write Switch statment if i need determine if date is between months or after date? SWITCH( TRUE(), Max(Klients[klient]) = "JSC4" && DATESBETWEEN('Date'[Date],"2017-01","2017-12"), App, ...
- 5 years ago
Hi Analitika ,
Please refer to the measure below:
Measure = SWITCH ( TRUE (), MAX ( Klients[klient] ) = "JSC4" && MAX ( 'Date'[Date] ) <= DATE ( 2017, 12, 31 ) && MAX ( 'Date'[Date] ) >= DATE ( 2017, 1, 1 ), App, MAX ( Klients[klient] ) = "JSC4" && MAX ( 'Date'[sort_month] ) / 100 + MAX ( 'Date'[YEAR] ) >= 2019.11, 0, DIVIDE ( Percent0, 100 ) )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
v-deddai1-msft
5 years agoCommunity Support
Hi Analitika ,
Please refer to the measure below:
Measure =
SWITCH (
TRUE (),
MAX ( Klients[klient] ) = "JSC4"
&& MAX ( 'Date'[Date] ) <= DATE ( 2017, 12, 31 )
&& MAX ( 'Date'[Date] ) >= DATE ( 2017, 1, 1 ), App,
MAX ( Klients[klient] ) = "JSC4"
&& MAX ( 'Date'[sort_month] ) / 100
+ MAX ( 'Date'[YEAR] ) >= 2019.11, 0,
DIVIDE ( Percent0, 100 )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai