Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anuhyak1
Creator
Creator

Multiple If conditions into a set analysis expression

I have multiple if conditions in UI for some graphs and tries convert to set analysis to perform better. Please, help to convert the below expression to set analysis . vCTSERD = 1 and vPMSERD = 1 are the buttons in UI.

='Total: ' & if(vCTSERD = 1, num(Count (Distinct
If (
$(vCT_All) = 1 and
([Received Date] >= %CumPStartDate and [Received Date] <= %CumPEndDate)
, EVENT_COUNTER)
), '#,##0', ',' )
& Chr(10) & '(' &
Num(Count (Distinct
If (
$(vCT_All) = 1 and
([Received Date] >= %CumPStartDate and [Received Date] <= %CumPEndDate)
, [Case Number])
),'#,##0'),
if(vPMSERD = 1,num(Count (Distinct
If (
$(vCT_All) = 1 and
([Received Date] >= %CumPStartDate and [Received Date] <= %CumPEndDate)
, EVENT_COUNTER)
), '#,##0', ',' )
& Chr(10) & '(' &
Num(Count (Distinct
If (
$(vCT_All) = 1 and
([Received Date] >= %CumPStartDate and [Received Date] <= %CumPEndDate)
, [Case Number])
),'#,##0'))) &' cases)

1 Reply
vinieme12
Champion III
Champion III

='Total: ' & if((vCTSERD = 1 or vPMSERD = 1) and $(vCT_All) = 1 ,

num(Count ({<[Received Date] ={">= %CumPStartDate <= %CumPEndDate">} Distinct EVENT_COUNTER ),'#,##0' )

& Chr(10) & '(' &

num(Count ({<[Received Date] ={">= %CumPStartDate <= %CumPEndDate">} Distinct [case number] ),'#,##0' )

&' cases')

)

 

In both scenarios vCTSERD = 1 or vPMSERD = 1 you are calculating the event counter and case number then why repeat them in separate if blocks??

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.