Page 1 of 1

Generate MDX for subsets in Excel

Posted: Wed May 11, 2022 9:02 pm
by Wim Gielis
Hi all,

A small fun side project of mine :-)

Turn on the record function by clicking the cell next to "Record mode" if it's off.
Then click on the 1st column of the orange table to apply that particular MDX operation of the result in the yellow cell.
Fill out the 3rd column of the table when arguments are needed.

There's a bit of VBA code but I keep it deliberately small. The formulae in the sheet, notably, Lambda's and MAKEARRAY are much more interesting.
You do need a recent Excel version to use the file.

I like the input table on the right-hand side, whereby dynamic array formulas do things we could not do in the past.

You could extend it for instance by sending the MDX to the clipboard.

Enjoy.
08.PNG
08.PNG (228.06 KiB) Viewed 13074 times
MDX generator - Wim Gielis.xlsm
(27 KiB) Downloaded 429 times

Re: Generate MDX for subsets in Excel

Posted: Wed May 11, 2022 9:39 pm
by 20 Ton Squirrel
Thanks very much for this, Wim. I'll peek into it and give some feedback this week.

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 7:28 pm
by 20 Ton Squirrel
I don't have some of these functions like MAKEARRAY so the workbook "breaks" on me.

I run Office 365, Excel is version 2002 (build 14931.20274). I see everyone on the internet gabbing about MAKEARRAY and LAMBDA functions but I don't have 'em. Now I'm jealous.

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 7:32 pm
by gtonkin
Looks like 2 years out of date-should be 2204 build 15xxx or something.
File, Account, Update? Or has IT blocked this?

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 7:35 pm
by gtonkin
Thanks for this post Wim, looks like some fun to be had.

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 7:37 pm
by 20 Ton Squirrel
My company's IT is the worst. Figures I'm two years behind and screwed for it. >__<

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 8:16 pm
by Wim Gielis
gtonkin wrote: Thu May 12, 2022 7:35 pmThanks for this post Wim, looks like some fun to be had.
You can barely imagine all the singing and dancing when working on the file. Beers and confetti all around. You should have seen it to believe.
</20 ton squirrel mode=OFF>

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 9:05 pm
by 20 Ton Squirrel
Wim Gielis wrote: Thu May 12, 2022 8:16 pm You can barely imagine all the singing and dancing when working on the file. Beers and confetti all around. You should have seen it to believe.
</20 ton squirrel mode=OFF>
It would seem I'm getting a reputation on this forum. Meh, I'm shameless anyway. I'll own it.

«attempts to </20 Ton Squirrel Mode=OFF> but OH NO THE TAG IS BROKEN AND XML SPILLS ALL OVER THE FLOOR, STAINING YOUR CARPET»

🤪

Re: Generate MDX for subsets in Excel

Posted: Thu May 12, 2022 9:14 pm
by Wim Gielis
Houston, we have an XML problem !