Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a very basic table with AccountType and Amount.
I want to create a gauge chart where the value is calculated as: Amount where AccountType = 'Vacancy' / (Amount where AccountType = 'Vacancy' + Amount where AccountType = 'Rented').
How can that be done?
Regards,
Staffan E.
Hello Staffan,
You may use set analysis for that:
Sum({< AccountType = {'Vacancy'} >} Amount) / Sum({< AccountType = {'Vacancy', 'Rented'} >} Amount)
Hello Staffan,
You may use set analysis for that:
Sum({< AccountType = {'Vacancy'} >} Amount) / Sum({< AccountType = {'Vacancy', 'Rented'} >} Amount)
Thank you very much for the help! It works great!
// Staffan
Hi,
It works great for me too!! 🙂 - that is, I do get a result in my gauge charts when using the following set analysis (copied and somewhat modified from Miguel, above):
(Sum({< OrderSalesManNo = {'12'} >} InvoiceLineAmountNetLC)
-
Sum({< OrderSalesManNo = {'12'} >} SalesmanBudget))
/
Sum({< OrderSalesManNo = {'12'} >} SalesmanBudget)
Hello Louise,
There are several questions in your post. For all year to date calculations, I'm creating, in my master calendar, a flag field for current and previous year, with function
which returns "-1" for true and "0" for false, meaning that set analysis for year to date comparisons is as easy asLOAD ... YearToDate(DateField, -1) AS PreviousYTD, YearToDate(DateField) AS CurrentYTD ... FROM ...
Sum({< PreviousYTD = {-1}>} Amount)
Hello Miguel,
Thank you for your reply :-). However, I'm not sure it helped me very much.
On the other hand - I did manage to combine my two conditions, Date and Salesman, in the same Set analysis and that works very well now.
Example:
(sum({ 1 < Year = {$(#=Only(Year(today())))}, OrderSalesManNo = {'11', '3', '4', '9', ' '} > } InvoiceLineAmountNetLC)
Best regards,
Louise