Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I am having one problem,that is
1. I am having 5 years data now,if i click a year in dashboard, i need current year max employee count Month data and previous year max employee count month data in bar chart .
2. dimension is month, and Expression is Count(distint Emp_Id).
3. any one having sample application for same soluation ,share me.
if any one knows the soluation.pls help me.
Thanks,
c vr
Hi,
You can use a bar chart with Year as dimension and expressions as:
1. =count({<Year={$(vLastYear)}>}distinct Employee)
where vLastYear is a variable defined as:
=Year(Today())-1
2. =count({<Year={$(vCurrentYear)}>}distinct Employee)
where vCurrentYear is a variable defined as:
=Year(Today())
Please find the sample attached.
Is that what you are looking for?
Regards,
-Khaled.
This is ok,but i need the max of employee count in current year and previous year. it mean which month having the top employees count in current year and previous year. this comparison is required.help me
Hi,
Just noticed that you need the value for year selected by user and its previous year.
Here's the updated QVW.
For this implementation:
1. Define a variable named vSelectedYear
with definition =GetFieldSelections(Year)
2. Define another variable named vPreviousYear
with definition =GetFieldSelections(Year)
and add these expressions in the bar chart:
1. =sum({<Year={$(vSelectedYear)}>}Value)
2. =sum({<Year={$(vPreviousYear)}>}Value)
Please find the QVW attached.
Hope that helps.
Regards,
-Khaled.
ok,but i need Max of count in current yearmonth and max of count in previous yearmonth
ok,but i need Max of count in current yearmonth and max of count in previous yearmonth
it means which month having the highest count in current year and previous year is required.help me
HI,
Can you attach the sample file.
Regards,
Jagan.
hi,
i need one sample application for what i am asking u friend.
Hi all,
i need the current year month and previous year month comparison ,but this months should be highest values in that years, when user selecting one year.
Hi,
Try this:
=sum({<Month={$(=Max(Month))},Year={$(vSelectedYear)}>} Value ) --- for the Current Selected Year
=sum( {$<Month = {$(=Max(Month)-1)},Year={$(vPreviousYear)}>} Value ) -- for the previous year
This should always use the max month to calculate the value.
Hope that helps.
Regards,
-Khaled.