Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to calculate sales of Maximum month of User selected Quarter and sales of Last month of Previous Quarter. Users will be selecting Quarters every time and expression should fetch sum of sales accordingly. Can anyone help? Thanks.
Could you post a qvw with sample data?
Calculate Monthname field from Date as Monthname(DateField) as Monthname
In set analysis you can try,
for maximum month of selected quarter
Monthname = {"$(=text(monthname(max(DateField))))"}
For Last month of Previous Quarter
Monthname = {"$(=text(monthname(addmonths(QuarterStart(max(DateField)),-1))))"}
Sorry, I cannot upload qvw here but I can explain my scenario. I have Calendar columns:- Year, Quarter, Month Number, PeriodID and QuarterID. In my dashboard I am giving Year, Quarter and Month List boxes for User selection.
User selection
1. When User selects Year from Year Listbox then,
sum(Selected Year) Sales + Sum (Previous Year) Sales -- This is working fine.
2. After Year Selection, User selects Quarter from Quarter Listbox then,
sum(Selected Quarter's Maximum Month) sales + sum(Previous Quarter's Maximum Month) sales -- Unable to get
3. After Year and Quarter Selection, User selects Month from Month Listbox then
sum(Selected Month) Sales + Sum (Previous Month) Sales -- Unable to get
Hi Shraddha,
Can you please also check above scenario which I mentioned? Thanks.
May be like this?
2. Sum ({<Year=,...>} <your expression >) // exclude year selection
3. Sum ({<Year=,Quarter=,...>} <your expression >) // exclude year and quarter selection
Hi Tresesco,
Yes, I am looking for Set expression.
Year should be preselected before selecting quarter. Thanks.
Without your qvw with sample data it would be very hard now to help you further.
Hi Tresesco,
Thanks for help. I have found the solution for this. I will be posting it soon so that it will help others.