Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a requirement to display all values falling within the quarter when any month within the quarter is selected in filters. So if the user selects the month of May, they should see sales from all of Q2. Can anyone help me adjust the syntax of the below (or provide an alternate solution if necessary)?
sum({<SaleQtr = p({<SaleMonth = {$(=GetFieldSelections(SaleMonth))}>} SaleQtr)>} sale_amount)
I have tried several variations on the above with no success so far.
Thanks
Thanks, but after much more trial and error, I have come up with the solution - sort of similar to your suggestion.
I created a variable using =concat(SaleQtr,',') to make a list of possible quarters, then use that in the set analysis:
{<SaleQtr = {$(=$(vSaleQtrs))}, SaleMonth = >}
This produces the desired result.
May be this:
Sum({<SaleQtr = p(SaleQtr), SaleMonth>} sale_amount)
Ashley
I use a master calendar and set a QTD flag based on a date in the calendar table. It will get refreshed with each load.
I use -InQuarterToDate(Datum, Today(),0) as CQTD_Flag,
Datum is autogenerated date.
Hope this helps
Sorry, that doesn't appear to be valid syntax for set analysis, and I can't quite figure out what you're suggesting well enough to adjust it.
I think i see what you're suggesting here, but my need is for it to be dynamic based on the user selection. If the user selects August, I need it to show all of Q3, if they select Feb, it should show Q1, etc. Or is there a way to adapt your suggestion to what I'm looking for? Sorry if I'm just not seeing it.
I am suggesting to ignore the selection made in SaleMonth field, but because of the selection made in SaleMonth we would have made a indirect selection in SaleQtr. So take everything for the SaleQtr (SaleQtr = p(SaleQtr)) part.
Thanks, but after much more trial and error, I have come up with the solution - sort of similar to your suggestion.
I created a variable using =concat(SaleQtr,',') to make a list of possible quarters, then use that in the set analysis:
{<SaleQtr = {$(=$(vSaleQtrs))}, SaleMonth = >}
This produces the desired result.
Glad you did, but I would suggest you to at least try it out once. I find p() to be a cleaner way of doing it + you might learn something new .
Best,
Sunny
Thanks, I did try the p() route in every possible configuration i could think of but it did not produce the desired behavior in my app.
Here is an example to look at