Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with variables

Hello All,

We are trying to improvise a dashboard

Set Analysis expression looks like :

=(if(Match(

[Task Name],

'ABC',

'FMG',

'ELT',

),1,(if(Match([Task Name],'PF'),Count({<Distribution={1},[Task Category]={"main","sub"},[Task Name]-={'*Distribution*','*Tiina*','*new Report*',  '*housekeeping*'},Node_TS_Date={">=$(=Date(Today()-30))<$(=Date(Today()))"}, [Task Status]={'Completed', 'Warning','Failed'}>}Node_TS_Hour),2)))

I want to use variables in this for reuse purpose.

vCategory = [Task Category]={"main","sub"}

vTaskName = [Task Name]-={'*Distribution*','*Tiina*','*new Report*',  '*housekeeping*'}

vTaskStatus = [Task Status]={'Completed', 'Warning','Failed'}

vTaskOneDay Match([Task Name],'ABC','FMG','ELT',)


I am unable to create a set analysis expressions with these variables.


I have put this in one variable


vExpectedPCG = if(Match([Task Name],'PF'),Count({<Distribution={1},[Task Category]={"main","sub"},[Task Name]-={'*Distribution*','*Tiina*','*new Report*',  '*housekeeping*'},Node_TS_Date={">=$(=Date(Today()-30))<$(=Date(Today()))"}, [Task Status]={'Completed', 'Warning','Failed'}>}Node_TS_Hour),2)


=if((=$('vTaskOneDay')),1, $(=vExpectedPCG))


It is giving result for all except vTaskOneDay  part.


Can someone please help on this.



9 Replies
zhadrakas
Specialist II
Specialist II

try to write it like this

'$(=vTaskOneDay)'

Not applicable
Author

Hello Tim,

     Tried with this expression : =if('$(=vTaskOneDay)',1, $(=vExpectedPCG)) No luck

VariableExpectedReloadCount is with above expression giving correct for all except ABC . count should be 1

Task NameReload datevariableExpected reloadCountsExpected reloadCounts
ABC2017-07-1821
XYZ2017-07-1822
PF2017-07-1833
Not applicable
Author

Hello All,

Variable :

vTaskOneDay 'ABC','FMG','ELT'

Partially it worked with

=(if(Match([Task Name],$(vTaskOneDay )),1, $(=vExpectedPCG)))

Still working on the other part.

vExpectedPCG = if(Match([Task Name],'PF'),Count({<Distribution={1},[Task Category]={"main","sub"},[Task Name]-={'*Distribution*','*Tiina*','*new Report*',  '*housekeeping*'},Node_TS_Date={">=$(=Date(Today()-30))<$(=Date(Today()))"}, [Task Status]={'Completed', 'Warning','Failed'}>}Node_TS_Hour),2)

Not applicable
Author


Hello All,


vEDXtaskname = 'PF','HG',SK'

trying to do but still getting error.

vExpectedPCG = if(Match([Task Name],$(=vEDXtaskname)),Count({<Distribution={1},[Task Category]={"main","sub"},[Task Name]-={'*Distribution*','*Tiina*','*new Report*',  '*housekeeping*'},Node_TS_Date={">=$(=Date(Today()-30))<$(=Date(Today()))"}, [Task Status]={'Completed', 'Warning','Failed'}>}Node_TS_Hour),2)


Regards,

Nisha

Kushal_Chawda

How many task names you have?

Not applicable
Author

Hello Kushal,

As of now we have 3 in task names but can change in future.

Kushal_Chawda

But in your expression looks like more,

'ABC',

'FMG',

'ELT',

'PF'

Not applicable
Author

Hello Kushal,

That way we have 100+ task, some run once a day, Some on EDX and some run twice.

We need to see the accuracy on what we are reloading based on the numbers it should be .

Hence task list may vary.

Regards,

Nisha

mjtaft2017
Partner - Creator
Partner - Creator

Hello Nisha

Maybe try what worked for your other variable when you put it in the expression and got desired result --

"Partially it worked with  =(if(Match([Task Name],$(vTaskOneDay ))  "

so this --

=if(Match([Task Name],$(vEDXtaskname)) ....