Dynamic CUBESET list

serky

New Member
Joined
Jun 30, 2014
Messages
39
Hi

can someone help with CUBESET syntax? I have searched the Internet but had no luck.

I would like to create a dynamic list of stores based on the date selected for the report eg - December 14. I have a look-up table with store information including the date opened. If the date opened <= report date, I would like that store to be listed in the report.

I can get a list of all the stores as follows:
CUBESET("PowerPivot Data","[Stores].[Name].[All].Children","Store Names")

What do I need to add to this to only show stores open for a given report date?

Or is there a better way to get the list?

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I believe you need to add a filter to the set expression, something along the lines of

CUBESET("PowerPivot Data","filter([Stores].[Name].[All].Children,[stores].[open date]<=Desired Date)","Store Names")

This works for me when I try to filter a cubeset by a measure, for some reason I have trouble getting it to work when trying to filter by another column. You could create an open date measure and then use

CUBESET("PowerPivot Data","filter([Stores].[Name].[All].Children,[measures].[open date]<=Desired Date)","Store Names")
 
Upvote 0
Hello

I tried a dummy variation to try and get it to work: CUBESET("PowerPivot Data","filter([Stores].[Name].[All].Children,[stores].[location]=3)","Store Names")
This returned a list but when I tried to use CUBERANKEDMEMBER to extract the values, I got a #N/A. Is this the problem you were talking about when using a column name?

I then tried to set up a measure for open date but it didn't work at all (have to admit I am really struggling with DAX).

Do you have an example of the measure syntax if I were to try either [location] or [open date]?

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,060
Messages
6,176,145
Members
452,707
Latest member
laplajewelry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top