水晶报表函数大全-汇总函�- 百度文库

ʹÄúÄܹ»µÃµ½±¨±íÖгöÏÖµÄÖµµÄ·ÇÖظ´¼ÆÊý¡£ÀýÈ磺

? Èç¹ûÏúÊÛ±¨±í°üº¬¿Í»§¶©¹ºµÄËùÓж©µ¥£¬Ôò¿ÉÒÔ¼ÆË㱨±íÖгöÏֵķÇÖظ´¿Í»§µÄ×ÜÊý£¨×ܼƷÇÖظ´¼ÆÊý£©£¬²»°üÀ¨ÈκÎÖظ´¼Ç¼¡£Èç¹û¿Í»§¶©¹ºÒ»¸öÒÔÉϵĶ©µ¥£¬ÔòºöÂÔ¸ÃÖظ´µÄ³öÏÖ¿Í»§¡£

? Èç¹û¶Ô¶©µ¥½øÐзÖ×飨ÀýÈ磬¶Ô¶©µ¥°´ÆäÀ´×ÔµÄÊ¡½øÐзÖ×飩£¬Ôò¿ÉÒÔ¼ÆËãÿ×飨ÔÚ±¾ÀýÖУ¬ÎªÃ¿Ê¡£©ÖзÇÖظ´¿Í»§µÄÊýÄ¿¡£Èκζ¨¹ºÒ»ÕÅÒÔÉ϶©µ¥µÄ¿Í»§ÒÔ¼°ÔÚ×éÖгöÏÖ¶à´ÎµÄ¿Í»§¶¼Ö»¼ÆÊýÒ»´Î¡£

? Èç¹û¶Ô¶©µ¥°´ÈÕÆÚ»ò²¼¶ûÖµ·Ö×飨ÀýÈ磬¶Ô¶©µ¥°´Æä·¢³öµÄÔ·ݽøÐзÖ×飩£¬Ôò¿ÉÒÔ¸ù¾ÝÈÕÆÚ»ò²¼¶û×Ö¶ÎÖеÄÌض¨±ä»¯À´¼ÆËãÿ×飨ÔÚ±¾ÀýÖУ¬ÎªÃ¿Ô£©ÖзÇÖظ´¿Í»§µÄÊýÄ¿¡£Èç¹û¿Í»§ÔÚÒ»¸öÔÂÄÚ·¢³öÒ»¸öÒÔÉϵĶ©µ¥£¬Ôò¸Ã¿Í»§µÄÖظ´ÊµÀý±»ºöÂÔ¡£

? Èç¹ûÖ¸¶¨µ¥¸öÖµµÄ¼¯ºÏ£¬Ôò¿ÉÒÔ¼ÆËã¸Ã¼¯ºÏÖзÇÖظ´ÖµµÄÊýÄ¿¡£¸Ã¼¯ºÏÖÐÖظ´ÖµÖ»¼ÆÊýÒ»´Î¡£ÓйØÕâÖÖ·ÇÖظ´¼ÆÊýµÄÐÅÏ¢£¬²Î¼û Êý×é»ã×ܺ¯Êý¡£

ʾÀý

ÏÂÁÐʾÀýÊÊÓÃÓÚ Basic Óï·¨ºÍ Crystal Óï·¨£º

DistinctCount({¿Í»§.µØÇø})

¶Ô¡°µØÇø¡±×Ö¶ÎÖгöÏֵIJ»Í¬Ê¡·Ý½øÐмÆÊý£¬ºöÂÔÈκÎÖظ´Ê¡·Ý¡£

DistinctCount({¿Í»§.³ÇÊÐ}, {¿Í»§.µØÇø})

¼ÆËãÿ¸ö¡°Ê¡¡±×éÖв»Í¬³ÇÊеÄÊýÄ¿¡£

DistinctCount({¶©µ¥.¿Í»§ ID}, {¶©µ¥.¶©µ¥ÈÕÆÚ}, \

¶ÔËùÁªÏµµÄ²»Í¬¿Í»§µÄÊýÄ¿½øÐмÆÊý£¬²»°üÀ¨ºóÐøÁªÏµÈË¡£Ã¿µ±¡°ÈÕÆÚ¡±×Ö¶ÎÖеÄÖµ¸ü¸ÄΪеÄÐÇÆÚʱ£¬¿Í»§¶¼½«½øÐзÖ×é¡£

ÏÂÁÐʾÀýÊÊÓÃÓÚ Crystal Óï·¨£º

DistinctCount([1,3,5,3,2,5])

·µ»Ø 4¡£¶ÔÊý×éÖзÇÖظ´ÖµµÄÊýÄ¿½øÐмÆÊý¡£Öظ´Öµ±»ºöÂÔ¡£

×¢Ò⣺ ÔÚ¹«Ê½ÖÐʹÓô˺¯ÊýÇ¿ÖÆÔÚ´òӡʱ¶Ô¹«Ê½ÇóÖµ¡£

ÓйØÇóֵʱ¼ä¿¼ÂÇÒòËصÄÏêϸÐÅÏ¢£¬²Î¼ûÇóֵʱ¼ä¡£

×¢ÊÍ

DistinctCount ¶Ô×Ö¶ÎÖзÇÖظ´ÖµµÄÊýÄ¿½øÐмÆÊý¡£Öظ´Öµ±»ºöÂÔ¡£

Correlation

Basic Óï·¨ºÍ Crystal Óï·¨¡£

ÖØÔØ

? ? ?

²ÎÊý

Correlation (fld, fld) Correlation (fld, fld, condFld) Correlation (fld, fld, condFld, cond)

? ? ?

fld ÊÇÈκÎÊýÖµ×ֶΡ£

condFld ÊÇÓÃÓÚ¶Ô fld ÖеÄÖµ½øÐзÖ×éʱËùÒÀ¾ÝµÄ×ֶΡ£

cond ÊDZíÃ÷ condFld ·Ö×éÀàÐ͵Ä×Ö·û´®¡£Ö»ÄÜÔÚ condFld ÊÇÒ»¸öÈÕÆÚ¡¢Ê±¼ä¡¢ÈÕÆÚʱ¼ä»ò²¼¶û×Ö¶Îʱ²ÅÖ¸¶¨´Ë²ÎÊý¡£Óйش˲ÎÊýÓÐЧ×Ö·û´®µÄÏêϸÐÅÏ¢£¬²Î¼û»ã×ܺ¯ÊýµÄÌõ¼þ¡£

·µ»Ø

СÊýÊý×Ö

²Ù×÷

ʹÄúÄܹ»¼ÆËãÖ¸¶¨×ֶεÄÏà¹ØϵÊý£¨¼´ÕâЩ×ֶΰ´Ïàͬ·½Ê½±ä»¯µÄ³Ì¶È£©¡£ÀýÈ磺

? ? ?

Äú¿ÉÒÔ¼ÆË㱨±íÖÐËùÓмǼµÄÁ½¸ö×ֶεÄÏà¹ØϵÊý¡£

Äú¿ÉÒÔ¶Ôij¸ö×飨ÀýÈ磬¶ÔÏúÊÛ°´ÆäÀ´×ÔµÄÊ¡½øÐзÖ×飩µÄËùÓÐÖµ¼ÆËãÁ½¸ö×ֶεÄÏà¹ØϵÊý¡£

Äú¿ÉÒÔ¶ÔÆä·Ö×éÓÉÈÕÆÚ×ֶλò²¼¶û×ֶεı仯½øÐпØÖƵÄ×飨ÀýÈ磬¶ÔÏúÊÛ°´ÆäÍê³ÉµÄÔ·ݽøÐзÖ×飩µÄËùÓÐÖµ¼ÆËãÁ½¸ö×ֶεÄÏà¹ØϵÊý¡£

ʾÀý

ÏÂÁÐʾÀýÊÊÓÃÓÚ Basic Óï·¨ºÍ Crystal Óï·¨£º

Correlation({¿Í»§.¿Í»§ ID}, {¿Í»§.ÐÅÓà ID})

¼ÆËã¡°¿Í»§ ID¡±ºÍ¡°´û·½ ID¡±×Ö¶ÎÖ®¼äµÄÏà¹ØϵÊý¡£

Correlation({¶©µ¥.¿Í»§ ID}, {¶©µ¥.ÐÅÓà ID}, {¿Í»§.µØÇø})

¼ÆËãÿ¸öµØÇøµÄ¡°¿Í»§ ID¡±ºÍ¡°´û·½ ID¡±×Ö¶ÎÖ®¼äµÄÏà¹ØϵÊý¡£

Correlation({¶©µ¥.¿Í»§ ID}, {¶©µ¥.ÐÅÓà ID}, {¿Í»§.µØÇø}, \

¼ÆËãÿÔÂÿ¸ö¡°µØÇø¡±×éÖÐËùÓÐÖµµÄ¡°¿Í»§ ID¡±ºÍ¡°´û·½ ID¡±Ö®¼äµÄÏà¹ØϵÊý¡£

×¢Ò⣺ ÔÚ¹«Ê½ÖÐʹÓô˺¯ÊýÇ¿ÖÆÔÚ´òӡʱ¶Ô¹«Ê½ÇóÖµ¡£

ÓйØÇóֵʱ¼ä¿¼ÂÇÒòËصÄÏêϸÐÅÏ¢£¬²Î¼ûÇóֵʱ¼ä¡£

×¢ÊÍ

³ý·ÇÏà¹ØϵÊý䶨Ò壬´Ëʱ¸Ãº¯Êý±»¸³ÒÔ¿ÕÖµ (0)£¬·ñÔòÏà¹ØϵÊýʼÖÕÊǽéÓÚ -1 ºÍ 1 Ö®¼äµÄÒ»¸öÊý¡£Èç¹ûÏà¹ØϵÊýΪ 0£¬ÔòÕâЩ×ֶβ»Ïà¹Ø¡£ Covariance

Basic Óï·¨ºÍ Crystal Óï·¨¡£

ÖØÔØ

? ? ?

²ÎÊý

Covariance (fld, fld) Covariance (fld, fld, condFld) Covariance (fld, fld, condFld, cond)

? ? ?

fld ÊÇ¿ÉÓɺ¯ÊýÇóÖµµÄÈκÎÊýÖµ×ֶΡ£

condFld ÊÇÓÃÓÚ¶Ô fld ÖеÄÖµ½øÐзÖ×éʱËùÒÀ¾ÝµÄ×ֶΡ£

cond ÊDZíÃ÷ condFld ·Ö×éÀàÐ͵Ä×Ö·û´®¡£Ö»ÄÜÔÚ condFld ÊÇÒ»¸öÈÕÆÚ¡¢Ê±¼ä¡¢ÈÕÆÚʱ¼ä»ò²¼¶û×Ö¶Îʱ²ÅÖ¸¶¨´Ë²ÎÊý¡£Óйش˲ÎÊýÓÐЧ×Ö·û´®µÄÏêϸÐÅÏ¢£¬²Î¼û»ã×ܺ¯ÊýµÄÌõ¼þ¡£

·µ»Ø

СÊýÊý×Ö

²Ù×÷

Covariance £¨Ð­·½²î£©ÊdzɶԱäÁ¿¼äµÄÏßÐÔ¹ØϵµÄ¶ÈÁ¿£¨¼´Á½¸ö×Ö¶ÎÒ»Æð±ä»¯µÄÇ÷ÊÆ£©¡£µ±×ֶΰ´ÕÕÌض¨µÄÊýѧ¹Øϵ±ä»¯Ê±£¬ÔòËüÃÇÊÇЭ±äµÄ¡£Ô²µÄÖܳ¤ºÍÔ²µÄ°ë¾¶ÊÇЭ±äµÄ¡£

ʾÀý

ÏÂÁÐʾÀýÊÊÓÃÓÚ Basic Óï·¨ºÍ Crystal Óï·¨£º

Covariance({table.FIELD1}, {table.FIELD2})

¼ÆËãÁ½¸ö×ֶεÄЭ·½²î£¬²¢ÒÔСÊýÐÎʽ·µ»ØЭ·½²î¡£

×¢Ò⣺ ÔÚ¹«Ê½ÖÐʹÓô˺¯ÊýÇ¿ÖÆÔÚ´òӡʱ¶Ô¹«Ê½ÇóÖµ¡£

ÓйØÇóֵʱ¼ä¿¼ÂÇÒòËصÄÏêϸÐÅÏ¢£¬²Î¼ûÇóֵʱ¼ä¡£

×¢ÊÍ

Covariance ÊÇʹÓÃÈçÏ·½·¨¼ÆËã³öÀ´µÄ£º

? ? ? ?

¼ÆËãÿ¸öÑù±¾ÖÐÏîÄ¿µÄƽ¾ùÖµ£¨¾ùÖµ£©¡£ ´ÓÁ½¸öÑù±¾Ã¿¸öÏîÄ¿µÄÖµÖмõȥƽ¾ùÖµ¡£ ½«Ã¿¶ÔÏîÄ¿µÄ²îÖµÏà³Ë¡£

¼ÆËã¸Ã³Ë·¨ÖÐËùÓг˻ýµÄƽ¾ùÖµ¡£½á¹ûΪЭ·½²î¡£

WeightedAverage

Basic Óï·¨ºÍ Crystal Óï·¨¡£

ÖØÔØ

? ? ?

²ÎÊý

WeightedAverage (fld, fld) WeightedAverage (fld, fld, condFld) WeightedAverage (fld, fld, condFld, cond)

? ? ?

fld ÊÇ¿ÉÓɺ¯ÊýÇóÖµµÄÈκÎÓÐЧµÄÊý×ÖÊý¾Ý¿â×ֶλò¹«Ê½×ֶΡ£ condFld ÊÇÓÃÓÚ¶Ô fld ÖеÄÖµ½øÐзÖ×éʱËùÒÀ¾ÝµÄ×ֶΡ£

cond ÊDZíÃ÷ condFld ·Ö×éÀàÐ͵Ä×Ö·û´®¡£Ö»ÄÜÔÚ condFld ÊÇÒ»¸öÈÕÆÚ¡¢Ê±¼ä¡¢ÈÕÆÚʱ¼ä»ò²¼¶û×Ö¶Îʱ²ÅÖ¸¶¨´Ë²ÎÊý¡£Óйش˲ÎÊýÓÐЧ×Ö·û´®µÄÏêϸÐÅÏ¢£¬²Î¼û»ã×ܺ¯ÊýµÄÌõ¼þ¡£

·µ»Ø

ÁªÏµ¿Í·þ£º779662525#qq.com(#Ì滻Ϊ@)