Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
INSERTING conditional filter on datCube
Shakill
<p>Hello everyone,
I am actually using BIRT 3.7.0 and i am having a problem making a conditional filter on a datacube using expression builder:
I have uploaded a print screen attachment(expressionBulider001.png).
You can see from tha attachement that i am doing a filter on the field dataSetRow["MOIS"] . I also have an another field using dataSetRow["ANNEE"].</p><p>what i want to do using the expression builder is :
if( dataSetRow["ANNEE"]== 2013){</p><p> </p><p> //filter the datacube using dataSetRow["MOIS"] = feb, march.april</p><p> </p><p>}
else if( dataSetRow["ANNEE"]== 2014){</p><p> //filter the datacube using dataSetRow["MOIS"] = May, June,July</p><p>}</p><p> </p><p> </p><p>Depending on the value of dataSetRow["ANNEE"], i want to filter the datacube using the field dataSetRow["MOIS"] by the above mentioned values.
if anyone can post a simple example on the above issue or printscreen(even better) , i will be very grateful.
Thanks in advance</p>
Find more posts tagged with
Comments
Stephan Lau
<p>Hi Shakill,</p><p> </p><p>maybe you can use the "Is True" filter condition to achieve the wanted filter result!?</p><p>Just put all the filter logic in the right site of the filter condition. Something like:</p><pre class="_prettyXprint _lang-js">var filterResult = false;if (dataSetRow["ANNEE"]== 2013) { if (dataSetRow["MOIS"] == "feb" || dataSetRow["MOIS"] == "march" || dataSetRow["MOIS"] == "april") { filterResult = true; }} else if (dataSetRow["ANNEE"]== 2014){ if (dataSetRow["MOIS"] == "May" || dataSetRow["MOIS"] == "June" || dataSetRow["MOIS"] == "July") { filterResult = true; }}filterResult;</pre><p> Hope this helps!</p>