BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9

Hello,

I want my DropDownList to show always the latest month by default. But the user should still be able to pick an other month. I don't want to resave my report each month to have the latest month there.

Any tips?

Filip

P1.png

P2.png

4 REPLIES 4
PeterWijers
Lapis Lazuli | Level 10

Discussed this with SAS Development, during a user meeting 2 weeks ago. Its a new request but not in yet.

The idea is to have it parameter controlled, so a parameter could calculate the defaults for an object.  (or two for a slider slider bar) etc.

I also face the same issue to often.

There is the option to make a DropDownList depending on a parameter (to reduce selectable options) but thats not what you expect.  (as far as I understand)

So you could automaticaly only have the dates from the actual month present.

Greetings

avvy
Quartz | Level 8

Hi,

To get the feel what you want, you have to add one "list object" in obove snapshot of the report.

May be this solution could help you :-

1) Create a calculated Item "Month Number" as" Month(DatePart(calldate))"

2) Create another calculated Item "Present Month Indicator" as :-

                                                            IF ( Month Number = Month(DatePart(Now())) )

                                                                     RETURN 1

                                                                      ELSE 0

3) Create a Custom Category "Month Name" based on "Month Number" created in step 1 and create 12 labels as jan, feb, mar etc and assign the corresponding values from "Month Number" distinct Values.

Now in the design part of the report :-

a) Add list object and assign the category as "Month Name" that we created in step 3 and apply a advanced filter as "present month indicator <> 0".

b) Uncheck the "Required" in the properties of list object.

c) Now simply give the interaction from "List object" ----> "Drop Down List" and from "Drop Down List"----> "Treemap".

So whenever the month changes, that particular month will be displayed in the list and the drop down list will contain the "calldate" for the same month.

Now if user wants to pick from other month, they can just uncheck the month name in the "List object".


Hope so, this helps you if I understood your requirement correctly.


Regards,

Abhishek

MirjamvanMoll
Calcite | Level 5

Hi Abhishek,

 

I tried your solution but still have one problem. Maybe you can help me out with this last issue.

 

I have a "list filter month number1" that is filtered by the present month indicator as you mentioned.

Also this "list filter month number1" filters a second filter "filter month number2". "Filter month number2" filters the object.

 

The "filter month number 1" does not change immediately  into the new month (for example last 1 december) as the present month indicator changes. It still gives the old month (november) and the user has to click the filter to change it into (december). 

If the end user still has to click the filter that he/she can also use a 'normal' filter and choose the last month.

 

How to make sure that the end user does not have to click the first filter?

 

 

Explore_SAS
Obsidian | Level 7

make the dropdown as required field and then right click and sort it by descending order.

That should be able to show the latest month on the top.

Thanks

Amol

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 7771 views
  • 7 likes
  • 5 in conversation