Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to show the Monthwise Right Frequency in the line chart. I am using below expression.
Expression:
=Num(Sum(Aggr(if(((Count({<DCRIS_ACTIVE = {'Y'},DCRActive = {'Field Work','Meeting'}>}DISTINCT DCR_DT&DCRVentasysCustomerId) - Count({<DCRIS_CUST_TYPE={'Retailer'},DCRVISITS_PER_MONTH ={'0'},DCRActive = {'Field Work','Meeting'},DCRIS_ACTIVE = {'Y'}>}DISTINCT DCR_DT&DCRVentasysCustomerId)-Count({<DCRIS_ACTIVE = {'Y'},DCRActive = {'Field Work','Meeting'},DCRIS_CUST_TYPE ={'Taxi Tour','DMS MT','DMS Rtl'}>}DISTINCT DCR_DT&DCRVentasysCustomerId))) >= Only({<DCRIS_CUST_TYPE ={'*'}-{'Taxi Tour','DMS MT','DMS Rtl'},DCRVISITS_PER_MONTH={'*'}-{'0'}>}DCRVISITS_PER_MONTH),1,0),DCRVentasysCustomerId)) /
(Count({<IS_ACTIVE = {'Y'}>}DISTINCT VentasysCustomerId) - Count({<CUST_TYPE={'Retailer'},VISITS_PER_MTH ={'0'},IS_ACTIVE = {'Y'}>}DISTINCT VentasysCustomerId)-Count({<IS_ACTIVE = {'Y'},CUST_TYPE={'Taxi Tour','DMS MT','DMS Rtl'}>}DISTINCT VentasysCustomerId)),'###.#%')
Note:
{<Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}
Kindly help me how to show monthwise for this report.
Do you have a sample where we can see this?
Before i apply YTD it is showing correct value.
After i Use this Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"} expression, it is showing as wrong.
=Num(Sum({<Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}Aggr(if(((Count({<DCRIS_ACTIVE = {'Y'},DCRActive = {'Field Work','Meeting'},Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}DISTINCT DCR_DT&DCRVentasysCustomerId) - Count({<DCRIS_CUST_TYPE={'Retailer'},DCRVISITS_PER_MONTH ={'0'},DCRActive = {'Field Work','Meeting'},DCRIS_ACTIVE = {'Y'},Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}DISTINCT DCR_DT&DCRVentasysCustomerId)-Count({<DCRIS_ACTIVE = {'Y'},DCRActive = {'Field Work','Meeting'},DCRIS_CUST_TYPE ={'Taxi Tour','DMS MT','DMS Rtl'}>}DISTINCT DCR_DT&DCRVentasysCustomerId))) >= Only({<DCRIS_CUST_TYPE ={'*'}-{'Taxi Tour','DMS MT','DMS Rtl'},DCRVISITS_PER_MONTH={'*'}-{'0'},Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}DCRVISITS_PER_MONTH),1,0),DCRVentasysCustomerId)) /
(Count({<IS_ACTIVE = {'Y'},Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}DISTINCT VentasysCustomerId) - Count({<CUST_TYPE={'Retailer'},VISITS_PER_MTH ={'0'},IS_ACTIVE = {'Y'},Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}DISTINCT VentasysCustomerId)-Count({<IS_ACTIVE = {'Y'},CUST_TYPE={'Taxi Tour','DMS MT','DMS Rtl'},Month,Calendar_Month = {">=$(=date(YearStart(date#(max(Calendar_Month),'MM')),'MM'))<=$(=max(Calendar_Month))"}>}DISTINCT VentasysCustomerId)),'###.#%')