Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
My data is looking like given below
report_id product_id priority
100 200 1
100 201 2
100 202 3
I am trying to get the count of report_id but my constraint is count(distinct If(priority=1 and priority<>2 and priority<>3,report_id))
and this should come as 1.
A report_id has so many product_id with different priority but i want to calculate only specific priority tickets irrespective of product_id.
Any ideas how to do this. Its really very urgent.
Tribhuwan
count( {$<priority={'1'}, product_id= > } priority) will count the records where priority=1 while disregarding any selection of product_id
Thanks for your reply.
User can select the Product Id from drop down and I have to write an expression which works in the manner I requested in my post
Thanks & Regards
Tribhuwan
I am using If condition to achieve this as this is an existing application and I have already something like this
Count( Distinct If(condition1 and condition2 and condition3,…….,report_id))
Additionally I want to do this also from product ids.
Thanks in advance
Thanks & Regards
Tribhuwan
Hi Gysbert
Kindly suggest any way to do this . It’s really very urgent.
Thanks & Regards
Tribhuwan
Hi,
Why do you want to use only if condition & not set analysis ?
Regards
HI
Actually I have already written expression which contains so many condition in “IF” and I want to add one more related to this product id.
I can’t switch to set analysis.
Thanks & Regards
Tribhuwan
can u post ur complete expression here.....?
Regards
I am comparing some field which are coming from different tables
Expression is like
Count( Distinct If(createdDate <= CalendarWeekEnd AND
Report_type = ‘Error’ AND
Priority_id = 1 AND
Blah Blah
)
My data contains report_id and every report_id is reported on one or more product_ids and every has different priority. So I wanted to calculate those report_ids irrespective of product id based on priority id.
As my existing expression is written in If so it would be very difficult for me to convert it into set analysis (8-9 comparisons related to dates in If that would be time consuming from development point of view)
Thanks & Regards
Tribhuwan
Hi,
try:
if( createdDate <= CalendarWeekEnd AND
Report_type = ‘Error’ AND
Priority_id = 1 AND
Blah Blah, count( distinct Report_id))