Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to calculate a sum based on a selected value from a field.
This is my formula. What is wrong with it?
=sum({<Application = {$(vApplication)}[[Scheduled Loads])
Basically, based on what selected value is in the Application List Box, I want to calculate the Scheduled Loads.
Thanks,
Adrian
=sum({<Application={$(vApplication)}>}[Scheduled Loads])
This is my formula, sorry. Still not working
Add quotes around variable
=sum({<Application={'$(vApplication)'}>}[Scheduled Loads])
if the variable vApplication contain only the application that you want to see then there is no need to add anything in your set analysis just sum([scheduled loads]) and it will take your selected application, now if you have another treatment for that you need to check if the vApplication is a string then you need to add quotes to your filter ={'$(vApplication)'}
It will always display 0, regardless the selection
can you upload a sample document ?
Hi
If you are setting vApplication to whatever you have selected in the list box, then this is all redundant. You do not need the variable, and just use =sum([Scheduled Loads]) in your expression.
If you don't want this to calculate or display unless something is selected, you can use conditional display or conditional calculation to prevent display or calculation if nothing is selected, for example: =GetSelectedCount(Application) > 0
HTH
Jonathan
The problem here is that, if I have 2 selected values (out of 4 possible), I want two different numbers, not the overall sum
then you need to add the application filed as a dimension, this way if you select 2 applications you will get one number for each selection
This is the document. Basically, if you see the bar chart, the numbers on the line are "hardcoded", but, what I want to do is whenever there is no value selected in Application, all 4 numbers should be there, but, when one, or two or three Applications are selected, I only want one, two or three number there, on the line graph.
Is that possible?
Thanks,
Adrian