BookmarkSubscribeRSS Feed
salamabdeen
Fluorite | Level 6

Hello guys!!

 

I am doing a report where I give the option to the user to choose either displaying the current month , if he chooses "Mês" from the button bar, or to display the values over the previous months including the current month, if he chooses "YTD".

 

I tried to use a Derived Item, but it is not helpful as it gives a single value, also  I tried calculated items with parameters, and I got lost.

 

Any one has a suggestion ?

 

Thank3.PNG

3 REPLIES 3
alineagostini
Obsidian | Level 7

Hi!

 

Have you thought about using the slider control object for selecting YTD?

I would suggest you take a look at this topic, there is a lot of useful info that may help you:

https://communities.sas.com/t5/SAS-Communities-Library/VA-Report-Example-Current-Month-vs-Previous-M...

 

FredrikE
Rhodochrosite | Level 12

DO you have two different meassures one for current and one for YTD?

That should be the first step, add them in a table and check that they work 🙂

 

If so I think you could do the following:

- Create a new parameter and assign it to the button bar.

- Create a new calculated meassure that select either current or YTD depending on the parameter. (IF [parm] = 'Current' then current_var else YTD_var)

- Use that new meassure in your report.

 

Might help or am I out in the blue 🙂

//Fredrik

salamabdeen
Fluorite | Level 6

Thanks for the help.

 

The problem is that I need to do more calculations, for example , we are in May 2018, but if someone choose March 2018 it should give the sum from January to March, and in this case the YTD_VAR doesn't give the expected results.

 

Thanks 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 3 replies
  • 1063 views
  • 2 likes
  • 3 in conversation