Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Top two values in current month comparing the same values with previous month

Hi all Please help me out top two values in current month comparing the same with previous month.

In June the top two profitted cuntries are Argentina and Japan

In May the top two profitted cuntries are America and Argentina

What i want is when i click on jun i want both june and may data to dispaly and the comparision should be between the selected month (jun) and top two values of it  Argentina and Japan to Argentina and Japanin May

32 Replies
varshavig12
Specialist
Specialist

Where are you getting stuck ?

What's your output ?

Can you share your qvw or some sample data in excel, so that I can create a small app as per your data?

Not applicable
Author

Try this in Second chart Expression

sum({<Year={$(=max(Year)-1)},Country=P({<Year={$(=max(Year))}>}Country)>}Sales)

Not applicable
Author

My month format is 2016 may  in the dashboard i want to write an expression on this format

varshavig12
Specialist
Specialist

you can write expression for 201605 and then convert it into 2016 may.

varshavig12
Specialist
Specialist

may be like this:

--> for previous month:

sum({$<MonthYear={"$(=date(AddMonths(max(MonthYear),-1),'YYYY MMM'))"}>}Value )

Not applicable
Author

Hi varsha thank you so much its working fine great job and can i get a stacked chart in this

Not applicable
Author

Hi i will try this

varshavig12
Specialist
Specialist

You're welcome!! I don't think so, give it a try.

varshavig12
Specialist
Specialist

Like this ?

or

two different charts:

varshavig12
Specialist
Specialist

Check this:

Stacked bar chart: