Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this is the source table:
Product | Checked | Price | Packed up | Category | Sent |
---|---|---|---|---|---|
Notebook YXZ | Yes | 499 | No | Hardware | No |
I create a table in the dashboard like this and want to count all "Yes" and all "No" for each product:
Product | Yes | No |
---|---|---|
Notebook YXZ | 1 | 2 |
How can i do it?
regards,
Fritz
Another Scripting Solution
LOAD *
,RangeSum(CheckFlag,PackFlag,SentFlag) as Yes's
,RangeMissingCount(CheckFlag,PackFlag,SentFlag) as No's
;
LOAD *
,if(Checked = 'Yes',1,null()) as CheckFlag
,if([Packed up] = 'Yes',1,null()) as PackFlag
,if(Sent = 'Yes',1,null()) as SentFlag
INLINE [
Product,Checked,Price,Packed up,Category,Sent
Notebook YXZ,Yes,499,No,Hardware,No
];
May be these
Dimension
Product
Expression
=SubStringCount(Upper(Checked&' '&Price&' '&[Packed up]&' '&Category&' '&Sent), 'YES')
=SubStringCount(Upper(Checked&' '&Price&' '&[Packed up]&' '&Category&' '&Sent), 'NO')
maybe like this:
in script create flags for each, Checked, Packed up, Sent like;
if (Checked='Yes',1) as Checked_Yesflag,
if(Packed up='Yes',1) as PackedUp_Yesflag,
if(Sent='Yes',1) as Sent_Yesflag,
if (Checked='No',1) as Checked_Noflag,
if(Packed up='No',1) as PackedUp_Noflag,
if(Sent='No',1) as Sent_Noflag
and in Dashboard object expression for YES =sum(Checked_Yesflag+PackedUp_Yesflag+Sent_Yesflag)
and for No =sum(Checked_Noflag+PackedUp_Nosflag+Sent_Nosflag)
Another Scripting Solution
LOAD *
,RangeSum(CheckFlag,PackFlag,SentFlag) as Yes's
,RangeMissingCount(CheckFlag,PackFlag,SentFlag) as No's
;
LOAD *
,if(Checked = 'Yes',1,null()) as CheckFlag
,if([Packed up] = 'Yes',1,null()) as PackFlag
,if(Sent = 'Yes',1,null()) as SentFlag
INLINE [
Product,Checked,Price,Packed up,Category,Sent
Notebook YXZ,Yes,499,No,Hardware,No
];