Filtering using strtoset

Hi,
i have the following MDX query that uses parameters from an SSRS report to produce a result set:
 WITH MEMBER PREM AS 
StrToMember("[Measures].[" + @PremiumType+ " Premium]")
SELECT NON EMPTY 
{PREM} 
ON COLUMNS, 
NONEMPTY 
(Filter({ ([Prospect Client].[Account Number].[Account Number].ALLMEMBERS * 
[Prospect Client].[Account Name].[Account Name].ALLMEMBERS *
[Prospect Client].[Division].[Division].ALLMEMBERS *
[Prospect Client].[Department].[Department].ALLMEMBERS *
[Prospect Client].[Section].[Section].ALLMEMBERS *
[Broker].[Account Direct Broker Code Previous].[Account Direct Broker Code Previous].ALLMEMBERS *
[Broker].[Account Direct Broker Code].[Account Direct Broker Code].ALLMEMBERS * 
[Broker].[Account Broker Name Previous - Big 6].[Account Broker Name Previous - Big 6].ALLMEMBERS *
[Broker].[Account Broker Name - Big 6].[Account Broker Name - Big 6].ALLMEMBERS)}
,[Broker].[Account Broker Name - Big 6].CurrentMember.name <> [Broker].[Account Broker Name Previous - Big 6].CurrentMember.name
AND ([Broker].[Account Broker Name Previous - Big 6].Members = "Marsh" OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = "Marsh")))
ON ROWS 
FROM ( SELECT ( - { [Broker].[Account Broker Name Previous - Big 6].&[] } ) 
 ON COLUMNS 
 FROM ( SELECT ( STRTOSET(@Operations, CONSTRAINED) )
 ON COLUMNS 
 FROM ( SELECT( STRTOSET(@Division, CONSTRAINED) ) 
 ON COLUMNS 
 FROM ( SELECT ( STRTOSET(@DateQuarter, CONSTRAINED) ) 
 ON COLUMNS 
 FROM ( SELECT ( STRTOSET(@ProductLineGroup, CONSTRAINED) ) 
 ON COLUMNS
FROM [Broker Premium])))))
the query gives me what I need, however, in the filter clause there is an OR statement that checks if the value of either the 'Account Broker Name Previous - Big 6' or the 'Account Broker Name - Big 6' = "Marsh".  Instead of hard coding the
value, i want to check a multi-valued parameter that will store the names pf the brokers.  I need to somehow replace the OR statement to filter the result set based on what is coming in from the parameter to see if either field has the value(s) from the
parameter.
so i basically need to replace the filter clause like this:
[Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker)
can this be done using MDX?

Hi Scott,
According to your description, you need to use STRTOSET function in your MDX filter like:
[Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker),
right?
In MDX query, STRTOSET function returns the set specified by a Multidimensional Expressions (MDX)–formatted string. So you cannot use Equal from a member to a set. You can change the FILTER function to EXISTS function.
EXISTS([Broker].[Account Broker Name Previous - Big 6].Members,STRTOSET(@Broker)) Here is a similar issue for you reference.
https://social.msdn.microsoft.com/forums/sqlserver/en-US/6964c181-3804-4c95-aa97-7fbc84e703a6/using-the-mdx-filter-function-in-a-parameter
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • QBE filtering using "OR" conjunction

    I would like to allow filtering on my table but set the criteria so that one or more specific rows always show up in the search regardless of the criteria entered in the table search headers. Any idea how to accomplish this? It seems that the Filter Criteria is just a map of name value pairs that are "AND'ed together. I need to add an "OR" condition that trumps all of the other QBE criteria. Ideally for better performance I would like to Union the entire filtered query with another query. I also had a thought that maybe I could copy a row from a different rowset of the same view into the filtered rowset but don't know if ADF would allow that. (ADF 11.1.1.4)

    Hi Scott,
    According to your description, you need to use STRTOSET function in your MDX filter like:
    [Broker].[Account Broker Name Previous - Big 6].Members = STRTOSET(@Broker) OR [Broker].[Account Broker Name - Big 6].CurrentMember.name = STRTOSET(@Broker),
    right?
    In MDX query, STRTOSET function returns the set specified by a Multidimensional Expressions (MDX)–formatted string. So you cannot use Equal from a member to a set. You can change the FILTER function to EXISTS function.
    EXISTS([Broker].[Account Broker Name Previous - Big 6].Members,STRTOSET(@Broker)) Here is a similar issue for you reference.
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/6964c181-3804-4c95-aa97-7fbc84e703a6/using-the-mdx-filter-function-in-a-parameter
    Regards,
    Charlie Liao
    TechNet Community Support

  • Conditional Filters using case statements

    Hello,
    I have a table view which displays Total Quota and Theatre Quota. Against the Total Quota, there are 2 values - Rollover Revenue and Theatre Revenue. Against the Theatre Quota, there is only Theatre Revenue.
    What I want to accomplish is to display only the Rollover Revenue Aggregated Quarterly number whenever there is a Total Quota number and not display the Theatre Revenue number
    In the table view,
    Year Name     Quarter Name     Quarter Name Sort     Person Region     Quota Name     Quarterly Quota     Credit Amount     QTD Attainment     Credit Type Name
    YEAR-2012     QTR-1-2012     QTR-1-2012     750     Total Quota     6,128,500     5,492,081     89.62%     Rollover Revenue Aggregated Quarterly
                   750          6,128,500     5,344,000     87.20%     Theatre Revenue
         QTR-2-2012     QTR-2-2012     750     Total Quota     5,922,500     5,890,264     99.46%     Rollover Revenue Aggregated Quarterly
                   750          5,922,500     6,120,000     103.33%     Theatre Revenue
         QTR-3-2012     QTR-3-2012     750     Total Quota     5,716,500     0     0.00%     
         QTR-4-2012     QTR-4-2012     750     Total Quota     5,510,500     0     0.00%     
    I used an example in the following link:
    http://oraclebizint.wordpress.com/2008/02/06/oracle-bi-ee-101332-conditional-filters-using-case-statements-in-filters/
    and applied the example in my scenario:
    CASE WHEN Quota."Quota Name" = 'Total Quota' THEN "Credit Type"."Credit Type Name" ELSE 'Dummy' END != 'Theatre Revenue'
    I still get duplicate rows.
    Thanks.

    Could you suggest any solutions for this problem where I can conditionally hide the number only for a certain type of data and not for all type of data?
    Thanks.

  • How can I achieve IOS content filtering using a Cisco router

    Good day Everybody.
    I would like to set up content filtering using IOS on my Cisco router. I already know how to do URL filtering but I want to restrict access to sites based on categories.
    Is this possible without having to introduce an external device?

    Natively in IOS this is not possible. However you can configure CWS (Cisco Web Security). The router will forward web requests to a cloud based web security service.
    http://www.cisco.com/en/US/prod/collateral/vpndevc/ps10142/ps11720/data_sheet_c78-729637.html

  • Show values of filters used in the columns

    hi experts
    Probably it is very simple but I don´t find how to do it. I would like to see in the query the values of the filters used to calculate the columns.
    I.e. One column is the amount of the net income for one month. The month is asked when I execute the query but when the query is executed I don´t see in the screen the month used.
    Thanks and regards

    Luis,
    I think you are wanting to use text variables on the columns to get the values of the month. To do this go into the column name and type &. It will prompt you to select, create, or edit a text variable. You can create a variable here to display the value of the characteristic your variable is on (i.e Month).
    Hope this helps,
    Rusty

  • IOS Content Filtering Using TrendMicro: Can I customize the block-page redirect-url?

    I have IOS content filtering using the Trend Micro subscription service working on a 2911 running 15.1.(3)T3 with the security license option and a 30 day demo Trend subscription.
    Once I figured out that the content filtering for Trend appears to be completely broken in 15.2 (even using docs for 15.2) I went back to 15.1 and it works great.
    Everything seems great so far except I would like to have a more 'fancy' or custom blocked page where a user can have a couple links to either go to the trend micro reporting page http://global.sitesafety.trendmicro.com/result.php or some other page, and maybe some branding so they know the page is coming from our network and is not some fake security thing or phishing attempt or whatever.
    I know I can use the 'parameter-map type urlfpolicy trend ' section to do a tiny bit of customization of the text that appears on the default blocked page display and there is an option for it to go to a simple redirect instead ('block-page redirect-url') but I wonder if anyone has any ideas on how to do more with either the built in page or the redirect-url to keep the information of what page the user was trying to access and why it was blocked (category etc.) while adding more features.
    Thanks!
    Oh, one last thing, this doesn't support any kind of 'user override' or anything like that does it? So that a network can have a filter applied but an admin could override the filtering to allow temporary access to something?

    Hmm... no thoughts over the weekend. Anyone?

  • OBIEE 10g answers display filters used in result

    Hi,
    Is it possible to display the values of filters used in the result of an answer report?
    E.g.
    answer report:
    branch, sales
    Filters: branch = 1
    I want to show the filters used in the result in compound view. I have tired different views, none of them seems to work for this.
    I know I can put it in a dashboard with prompts so users can see the filters applied. But just curious is there any way to do it in the answers? Because in dashboard, it only prints PDF or HTML, but in answers it can print excel, which is what I want.

    In compoud Layout itself, there is option to add filter view. in the top of the answers resuls, you can find some tools and tabs, there you can find add view, by adding the filter view you can have the filter in the compound layout and you can see it printed in PDF like below.
    Fiscal Period
    Closing Amount
    2012-12     
    11.9
    2013-01    
    93.52
    Fiscal Period is equal to 2012-12 , 2013-
    01
    Try it and let me know if it works.

  • Export to Excel is not working for List View Web Part after filtering using Query String parameters in SharePoint 2010

    Hi, 
    I am filtering SharePoint list view web part based on Query string parameter and I am doing Export to Excel by using following code.
    <a href="#" onclick="javascript:window.location='../_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List=0DC67399-BE11-48F3-ADFC-E911FB8B5845&View=54671412-3EFE-4281-835A-9EF747AE774E&CacheControl=1'"><img
    alt="Excel" src="/_layouts/images/icxlsx.gif" border="0"/>&nbsp;Export to Excel</a>
    Issue: Able to do Export to Excel when there are no filters applied on list view web part but if applied filters on web part and do export to excel , only header fields are displaying in the excel sheet.
    I don't know why owssvr.dll is behaving like that .
    Please share your ideas.
    Thanks in Advance.

    Hi,
    According to your post, my understanding is that you wanted to create hyperlink to export to excel.
    The URL to execute the export is as follows:
    {Site URL}/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={List GUID}&View={View GUID}&CacheControl=1
    After getting the GUID, you  need to “decode” the list GUID.
    Replace %7B with {
    Replace %2D with –
    Replace %7D with }
    More information:
    Create Link to Export Library Contents to Excel
    SharePoint - Create a link to export to Excel
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Filters used in a query

    Hi,
    Is there anyway we can know what filters are being used in a query. I am using 2 variables to filter my query.But the report gives me this warning "Invalid filter on ZCODE: Filter changed". This is a display hierarchy with no variables on this infoobject. Can anyone  explain why it is giving me this warning and how I can view the filters when I run the query. All your answers will be rewarded.
    Thanks,
    Kal

    > Go to Query Properties - Variable Sequence - U shud
    > see all the variables here.
    > Do u have a Hier Variable set up for ZCODE.
    There is no variable set for ZCODE. It is just a display hierarchy. But the warning shows me a filter on ZCODE. Is it anyone of the dynamic filters which pop up in the warning messages(This is just a guess). I dont understand how the filters get assigned for infoobjects which do not have any variables associated with it.

  • Please help me identify the filters used in this image

    Hey there folks!
    I currently have a contract with a lingerie company, who want me to make a collage quite similar to the following image, which they have provided me with. Mine will be obviously much different, but the same idea...a little boutique shop front but with Paris in the backgrounds etc with one colour and lots of glowing lights and stars.
    What I am wondering, as I am quite new to Photoshop collages (I usually use it for retouching images etc), is how was this image put together, what kind of effects were used? How many different images have been used in this one?
    So far I have a street lamp, a shop front, a girl, and an image of Paris at night. I'm especially unsure about how to do that circular gradient around the image - and the company are absolutely mad for it!
    Thanks so much folks!

    What I am wondering, as I am quite new to Photoshop collages (I usually use it for retouching images etc), is how was this image put together, what kind of effects were used? How many different images have been used in this one?
    The image is a bit small to judge, but it could have been shot with the lamp and storefront as props on a reflective flooring and even the background might have been in the studio – the last one I doubt, though, because it does not reflect in the floor.
    Anyway, if you do make a montage I personally find it important to
    • combine the parts as Smart Objects,
    • do the object-clipping with Layers Masks in the Smart Objects and
    • use Adjustment Layers for color corrections.
    As for
    glowing lights and stars
    stars are fairly easily faked (if one has low enough standards) with a white Solid Color Layer set to Blend Mode Dissolve and the Opacity and Fill Opacity reduced accordingly; for different sizes convert to Smart Object, duplicate and upscale.
    Glows can be done various ways. For example making a SO-duplicate, using the Filters Maximum and Gaussian Blur and setting the layer to Blend Mode Screen (if necessary use the Blend If-settings to limit the effect).

  • Table Filters using webdynpro Java

    Hi Experts,
    I am trying to implement Table Filter i did every thing mentioned in this
    Generic Web Dynpro Java Table Filter still am not getting the filter values
    all the table columns remains same it is not doing any filtering , please help me in solving this logical issue
    Thanks a lot in advance.
    Regards,
    Ken.

    Hi Ken,
    I believe you might came across these blogs as well: if not pls go through the below blogs:
    How to get ready-made filter for your Web Dynpro Table with minimal coding ?
    Filtering Table Values using WebDynpro
    Hope this helps.
    Cheers-
    Pramod

  • Filtering data already filtered using DAX

    Hi there
    I am using DAX to calculate the count of instances in a filtered table
    e.g.
    =CALCULATE( COUNT(Table[Tariff] ,
    FILTER( Table , Table[Tariff] > 0 )
    This part of the code works fine. My trouble arises when I am trying to filter the table that I have already filtered:
    =CALCULATE( COUNT(Table[Tariff] ,
    FILTER ( FILTER( Table , Table[Tariff] > 0 ) , Table[Tariff] = MIN(Table[Tariff]) )
    In the above calculation, I want to 
    1. Filter out the tariffs that are greater than zero [this bit works fine]; and then
    2. Take that table filtered from 1. above and further filter that by extracting only those tariffs that are equal to the minimum in that data table [this part isn't working].
    Instead of doing what I need it to, this formula is treating the outer FILTER in the same manner that it would be treated if I had only one filter. Thus, as zero is the minimum in the unfiltered data set it is only returning all the zero tariffs - even through
    I filtered these out already.
    If anyone can please assist, it would be much appreciated.
    Cheers
    Andrew

    Hi Andrew,
    Something along these line may work...
    =CALCULATE(
    SUM(TariffData[Tariff])/COUNT(TariffData[Tariff]),
    FILTER(
    FILTER(
    TariffData,
    TariffData[BEGIN_DATE_INDEX] <= [Date_Count]
    && TariffData[END_DATE_INDEX] >= [Date_Count]
    TariffData[Tariff_Duration] = CALCULATE(
    MIN(TariffData[Tariff_Duration]),
    FILTER(
    TariffData,
    TariffData[BEGIN_DATE_INDEX] <= [Date_Count]
    && TariffData[END_DATE_INDEX] >= [Date_Count]
    ...But it's likely that you'll need to adjust the inner most CALCULATE to get the right behaviour due to the filter context transition. If you're able to provide some test data and details of how the data has been modelled, we should be able to arrive at
    a solution that definitely works.
    Regards,
    Michael Amadi
    Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
    Website: http://www.nimblelearn.com
    Blog: http://www.nimblelearn.com/blog
    Twitter: @nimblelearn

  • [FR] BB10 should support automatic filtering using Sieve

    It would be great if BB10 could support automatic email filtering/filing.
    Sieve works great for IMAP based mail systems, which is what most people will use besides Activesync.
    When the user needs to modify rules, BB10 devices would simply need to connect to the server and edit the sieve script.
    It would probably be best to add the BB rules to the main files. That way the OS could easily provide a UI for the support functions like filing messages based on email addresses.
    Olivier - interfaSys ltd
    Developing for BlackBerry 10 devices using the Sencha Touch framework.

    An app could probably be written, but it wouldn't be integrated and might not be very user friendly because of that.
    Server-Based Sieve
    http://sieve.info/servers
    AfterLogic ManageSieve Server, a standalone Sieve server.
    The Alt-N Technologies SecurityGateway has a filtering engine which is based upon the Sieve mail filtering language.
    Archiveopteryx is an IMAP and SMTP Server with Sieve support on IMAP level.
    AXIGEN is a mail server with groupware and collaboration functionalities and SMTP, POP3, IMAP and Sieve support.
    The Carnegie Mellon University Sieve implementation was initially released in January, 1999. It's now part of the Cyrus IMAP server. ManageSieve has been implemented as part of the CMU Cyrus Sieve suite.
    Citadel is a tightly integrated, easy to install, open source groupware platform. Sieve support began with version 7.00 of the system. Normal users can have Sieve scripts auto-generated when they use a web-based rules editor. Advanced users can compose their own Sieve scripts and enter them using the web interface or the managesieve protocol.
    DBMail is adding support for Sieve and ManageSieve.
    Dovecot has a plugin that adds support for the Sieve language to its local delivery agent. For Dovecot versions before v1.2, this plugin was based on the CMU Cyrus Sieve suite. As per Dovecot v1.2, a rewritten implementation of the plugin is provided. It is part of the Pigeonhole project, which also provides native ManageSieve protocol support for Dovecot.
    Exim v4 has support for Sieve scripts.
    Isode M-Box includes support for Sieve, which is thread safe version of Cyrus Sieve. ManageSieve has been implemented as part of the Isode M-Box suite.
    Apache JAMES project can use the JSieve component. JSieve is a language processor that can also be plugged into any internet mail application to add Sieve support.
    Kerio Connect has a filtering engine which is based upon the Sieve mail filtering language.
    mvmf is a delivery agent currently in use, and still under active development. Its scripting language includes an embedded Sieve implementation.
    Oracle Communications Messaging Exchange Server (former Sun Java System Messaging Server) has support for Sieve.
    Newer versions of PMDF from Process Software have Sieve support via a web-based interface.
    Perdition is a proxy server supporting POP3, IMAP and ManageSieve (as of version 1.19).
    pysieved: Python Managesieve Server, a standalone Sieve server that can be tied to different solutions.
    Rockliffe Mailsite v5 supports server, domain and mailbox level Sieve filtering with a rule based windows GUI, and a slightly limited web based GUI. A trial version can be downloaded from the web site.
    Some Sendmail, Inc. products support Sieve.
    Vircom's modus line of email and front-end servers uses a Sieve engine.
    Olivier - interfaSys ltd
    Developing for BlackBerry 10 devices using the Sencha Touch framework.

  • IronPort Attachment Filtering using Content Filter Dictionaries

    Hello,
    one of our customers experiences some Problems with filtering attachments based on their file extensions.
    What we did: We created a dictionary with extension formats like ".exe" or ".cab"
    Based on this dictionary we created a policy, that all Mails are scanned. If an attachment matching this dictionary is in the mail, this attachment will be striped and replaced by a TXT file.
    In my tests this worked fine, only files matching are replaced, the others pass. BUT after activating the rule, we had the Problem, that a lot of attachments not having an extension that should be filtered where striped. So ".xls" or ".pdf" where striped too.
    Can you help me how to configure it correct? Do we have to change something in the Dictionary? Why is this happening, any explanation?
    Thanks a lot for your help in advance and best regards
    Michael

    Hello,
    We are doing something similar, but we are not using a dictionary. We specify the file extension in a content filter action of strip attachment by file info, file name ends with, and we use this regular expression:
    (?i)\.bat
    (?i) makes it case insensitive, the "\" makes the action search for the special character period (which in regex is a wildcard), and then the file extension. 
    When you save it, it will look a little off, the GUI adds some regex characters to it. the entry will look something like this on the content filter page:
    drop-attachments-by-name("(?i)\\.bat$"
    This expression will drop all instances of file extensions that have .bat, which includes all possible combinations. Examples include .BAT, .bat, .bAT, so on and so forth.
    Hope this helps =) 

  • Problem filtering using between dates

    Hi, I have a Measure in Webi that has to show the Invoicing Quantity between 2 dates. The thing is that i don't know how to do it and I tried many many times. The Dimension that has the date is a date field.
    The thing is that i tried to "check" if i'm mispelling something and I added the dates (start date and End DAte) as filters in the execution of the consult and it brings the data without any fail and also the correct quantities.
    How can I filter the invoicing quantities between 2 dates using a Measure?
    Thanks in advance,
    Reynaldo

    Hi Stratos, I have created a derived table in order to bring the Invoicing. The Dates aren't prompts fields, there are a Formula that if a launch the report today, it has to bring the invoices between monday and friday of last week, and also the sales of the last 21 days (that's the second column).
    The database is Oracle, I think the trouble is how the dates are shown by the DB, because are formated in DD/MM/YYYY HH:MM:SS and I need it only DD/MM/YYYY. I used the function To_date by oracle, but, still brings the HH:MM:SS, when I look for the values of the table.
    This problem, I think is going also to Webi and when I try to filter using a Measure doesn't bring data, but If I use the filter used by Webi (the one that modifies the query, brings the data ok)
    Can you help me?.
    Thanks in advance,
    PD: Hope you understand!
    Reynaldo

Maybe you are looking for

  • Deploy Hibernate (v 3.6) on Weblogic 11gR1 (patch set 2)

    Hello, Facing issues in deploying hibernate JPA 2.0 project on Weblogic server 10.3.3 The error message being: Module named 'EJB605EAR' failed to redeploy. See Error Log view for more detail. weblogic.management.DeploymentException: VALIDATION PROBLE

  • Wifi connection not active

    When i first got my blackberry 2 weeks ago, i had no problem connecting to my home wifi network.  i manually added the network, entered the network and success!  Last night however, the BT network crashed and my internet died, and i think this has so

  • Reprocess INBOUND through report

    Hi All,      For a specific requirement i need to resend a copy of an IDOC as a new IDOC as well as Reprocess an inbound IDOC through a report program. I have achevied the functionality of reprocessing the inbound IDOC using the the FM IDOC_INBOUND_W

  • I keep getting the error -42404

    Everytime i try to sync my ipod to my computer, itunes prevents it and says "failed to start sync". it then tells me to repair or reinstall itunes so that it can fix error code: -42404. I reinstalled it, it did not work. I then tried calling tech sup

  • Add Auto ID field to a Z* table ??

    Hello, I'm creating a master Z* table and i need to have a field (numc or similar) who increments 1 for every record I add. So the table would be able to update with sm30 but  one field must be automaticaly incremented when I save changes. How to cre