Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
I have a data like below
My req is: I need to get the data when I filter 3build I need only greater than 3days durion Renum should display
and for 5Build I need to display more than 7Days Renum should display
by default it should display all the data.
below is expression which I used but it is not working.
=if([ Name]='3Build' and [ Duration]>=3,[ReNum])
if([Name]='5Build' and [Duration]>7,[ReNum],[ReNum]))
what is wrong in my exp?
ReNum | Name | Duration |
A1 | 3Build | 1.2 |
A2 | 3Build | 2.2 |
A3 | 3Build | 3.5 |
A4 | 3Build | 4.5 |
A5 | 5Build | 6.7 |
A6 | 5Build | 7.6 |
A7 | 5Build | 8.6 |
A8 | 5Build | 5.4 |
A9 | ARP | 22.1 |
A10 | DRP | 33.1 |
A11 | CRP | 23.4 |
Hi Sony,
Try this script:
Data:
Load
*,
if(Name='3Build',sign(Duration - 3),if(Name='5Build',sign(Duration - 7),1)) as CondShow;
LOAD * Inline [
ReNum,Name,Duration
A1,3Build,1.2
A2,3Build,2.2
A3,3Build,3.5
A4,3Build,4.5
A5,5Build,6.7
A6,5Build,7.6
A7,5Build,8.6
A8,5Build,5.4
A9,ARP,22.1
A10,DRP,33.1
A11,CRP,23.4
];
Create a straight table with dimensions ReNum, Name and Duration.
Add this expression:
if(not isnull(GetCurrentSelections('|')),
CondShow + if(Wildmatch('$(=GetCurrentSelections('|'))','*' & Name & '*'),1,0),1)
You can hide this expression column.
In the Presentation tab check Suppress Zero Values.
It's a bit messy but seems to give you what you need.
Cheers
Andrew
PS
If you don't want to change your script use this expression instead
if(not isnull(GetCurrentSelections('|')),
if(Name='3Build',sign(Duration - 3),if(Name='5Build',sign(Duration - 7),1)) + if(Wildmatch('$(=GetCurrentSelections('|'))','*' & Name & '*'),1,0),1)
thanks for your response.
but I have 20dimensions and one measure. I don't know why it is not working.
but I created separate table for full data and for 3build one table and 5build other table.
used below exp
=count({<[name]={'5Build'},[Duration]={'>7'}>}[Renum])
and
=count({<[name]={'3Build'},[Duration]={'>3'}>}[Renum])