Forum Discussion
Anonymous
6 years agoNot applicable
SQL Case statement to DAX with Dates & mesure
CASE WHEN REPORT_DATE>DATEADD(DAY,305,MIN_MTH) THEN AVG(TOTAL_DEBT) OVER PARTITION BY COMPANY_CODE,REGION_ID,CLUSTER_ID,MCO_ID,MSO_ID,COUNTRY_CODE,ACCOUNT_NO,CUSTOMER_NAME RDER BY REPORT_DATE ROWS ...
- 6 years ago
Hi Anonymous
I haven't work with SQL window functions for quite some time, but if you try to explain what you trying to achieve and provide a data sample then I can try to help.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
amitchandak
6 years agoSuper User
Anonymous , Switch True you can use
example
color =
switch ( true(),
FIRSTNONBLANK(Table[commodity],"NA") ="commodity1" && sum(Table[Value]) >500,"lightgreen",
FIRSTNONBLANK(Table[commodity],"NA") ="commodity2" && sum(Table[Value]) >1000,"lightgreen",
/// Add more conditions
"red"
)
&& and
|| Or
between use && and put two condition
PARTITION BY - Summarize, groupby few more