Display the current date

Post Reply
Sleezy_123
Posts: 2
Joined: Sat Nov 03, 2018 12:34 pm
OLAP Product: TM1
Version: 2.0
Excel Version: 2016

Display the current date

Post by Sleezy_123 » Sat Nov 03, 2018 1:00 pm

Hello!

I want to show the current weeks in PAW. I have created an attribute for the element (for eg. 2018-04-01).

What should I do next? help a pal out.
Last edited by Sleezy_123 on Mon Nov 05, 2018 1:35 pm, edited 1 time in total.

User avatar
jim wood
Site Admin
Posts: 3609
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: TM1 10.2.2
Excel Version: 2007
Location: 1639 Route 10, Suite 107, Parsippany, NJ, USA
Contact:

Re: Display the current date

Post by jim wood » Mon Nov 05, 2018 12:35 pm

Firstly I hope you created it as an alias? Also remember they have to be unique, so if you display the current date make sure it's for either one element or it's a post fix. Lastly you need to create a rule on the control cube. Then use the Today() function. If you check the reference guide there are lots of ways to format it the way you want it,

Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Application Consulting Group (ACG) TM1 Consulting
OS: Windows 10 64-bit. TM1 Version: 10.2.2

Sleezy_123
Posts: 2
Joined: Sat Nov 03, 2018 12:34 pm
OLAP Product: TM1
Version: 2.0
Excel Version: 2016

Re: Display the current date

Post by Sleezy_123 » Mon Nov 05, 2018 1:45 pm

Hello,

Thanks for replying.

I had created a dynamic subset for my period dimension.
As shown, on the attachment,
I had created an attribute of '1' so that I could show the current week of the date.

I just started using rules. Hope you can help me out!

Thank you so much!

bgregs
Posts: 37
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Re: Display the current date

Post by bgregs » Mon Nov 05, 2018 2:01 pm

I'm sorry, but I'm really having a hard time understanding what you're trying to accomplish here. Firstly, (as per Jim's comment) you should have your "CurrentDate" attribute created as an alias, in your screenshot you have it listed as "Text". My second question would be regarding your "Num" attribute. What are you trying to accomplish with that? Are you just using this to flag the days you want to show in a dynamic subset? That would really defeat the whole "dynamic" side of things..... ;) Last but not least, if the requirement is for the CURRENT WEEK, why are you giving us use cases where you are flagging weeks in April? Is the requirement different, or are you just testing?

My recommendation is to look into TM1's date/time functions (Alan has posted some very, very good resources on this in the "General" tab of this forum). From there we can begin to look into possibly creating some MDX statements. This would be my recommended approach for generating a dynamic subset. You could potentially base the current week off of a rule calculated attribute in your "Settings" cube (as per Jim's comment below), but there are multiple ways to handle this.

Please read this: http://www.tm1forum.com/viewtopic.php?t=2441
And then this: https://www.ibm.com/support/knowledgece ... ments.html
And then finally this: http://www.bihints.com/book/export/html/68

Post Reply