Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello experts,
Maybe there's a cleaner way, but this is what I threw together:
Cross:
CROSSTABLE (AttributeX,Flag)
LOAD
ID
,Attribute1
,Attribute2
,Attribute3
RESIDENT Raw
;
INNER JOIN (Cross)
LOAD 1 as Flag
AUTOGENERATE 1
;
DROP FIELD Flag;
LEFT JOIN (Cross)
LOAD
ID
,AttributeX as AttributeY
RESIDENT Cross
;
INNER JOIN (Cross)
LOAD *
RESIDENT Cross
WHERE AttributeX <> AttributeY
;
And the chart:
Dimension 1 = AttributeX
Dimension 2 = AttributeY
Expresson = count({<BAD={'Y'}>} distinct ID)/count(total distinct ID)
Maybe there's a cleaner way, but this is what I threw together:
Cross:
CROSSTABLE (AttributeX,Flag)
LOAD
ID
,Attribute1
,Attribute2
,Attribute3
RESIDENT Raw
;
INNER JOIN (Cross)
LOAD 1 as Flag
AUTOGENERATE 1
;
DROP FIELD Flag;
LEFT JOIN (Cross)
LOAD
ID
,AttributeX as AttributeY
RESIDENT Cross
;
INNER JOIN (Cross)
LOAD *
RESIDENT Cross
WHERE AttributeX <> AttributeY
;
And the chart:
Dimension 1 = AttributeX
Dimension 2 = AttributeY
Expresson = count({<BAD={'Y'}>} distinct ID)/count(total distinct ID)
Thanks John, it works great.
I have a pretty big dataset of several other variables that I have to create filters for.
Wondering if there are more variables to toggle like below and user has to select desired
model->category->bin->.... to calculate the Freq and BAD rate matrix. If there is any other method that you could think of, please let me know.
ID model category bin attribute1 attribute2 attribute3 BAD (Y-> yes)
1 1 a 1-2 1 0 0 Y
2 1 a 1-2 1 1 0 N
3 1 b 1-2 1 0 1 Y
4 2 c 1-2 0 1 1 N
5 2 a 3-4 1 1 0 Y
6 3 b 3-4 1 1 0 N
7 3 a 4-5 1 0 1 Y
8 4 c 3-4 1 0 1 N
Add as many attributes as you want. Same script. Seems to produce the results I would expect. If they aren't right, what results do YOU want when making selections on this data?
Thank you! Tried it on my data, works great!
One last question. I tried using colormix on the resulting pivot table to create a heatmap. It works fine for frequency matrix using the expression
=RGB(255,
255*(1-frequency/100),
255*(1-frequency/100)
)
Here 'frequency' is count(distinct Application_Number)
When I tried to use same logic to create heatmap for Bad rate matrix using below expression I am not getting desired results
=RGB(255,
255*(1-rate/100),
255*(1-rate/100)
)
Here 'rate' is count({<EVER_PST_DUE_60_FLG={'Y'}>} distinct Application_Number)/count(total distinct Application_Number)
Any suggestions on this?
Your data is completely different in the second table. Imagine you had data like that in the first table - it's all less than 1, so it would all be white, just like 1 is in your first table. And that's what you see. You need a new expression for the second table. You could probably use the wizard again based on THIS data set instead of on the previous. It might come up with something like this.
RGB(255,255*(1-rate*500),255*(1-rate*500))
Got it. That expression works.Thanks a lot for your help on this.