Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I am working on a histogram bar chart. I am trying to make it so when I select a company from a filter pane the chart updates with data only from the companies with the same asset range (eg. the user selects Company A which has an asset range of 1 million - 2 million and the chart updates with data from companies who only have asset range of 1million - 2 million)
Here is what I have so far which doesn't work:
Count({1<[AssetRange]= P({1<[company]= $(vCompany) >} [AssetRange]) >}[ParticipationRate])
where I have defined vCompany = GetFieldSelections([company]). When I try to hard code the company in like this:
Count({1<[AssetRange]= P({1<[company]= {'CompanyA'} >} [AssetRange]) >}[ParticipationRate])
I get the desired result. My question is, what am I doing wrong as far as using the variable in this case. Please feel free to ask any clarifying questions, or let me know if anything is ambiguous.
Thanks in advance ![]()
Yes, it puts a single quotes. Can you try this:
Count({1<[AssetRange]= p({1<[company]= p(company)>} [AssetRange])>}[ParticipationRate])
Try this:
Set vCompany = Chr(39) & GetFieldSelections([company], Chr(39) & ',' & Chr(39)) & Chr(39)
That puts quotes around the output of GetFieldSelections right? It didn't work but I will continue playing around with it. Thanks!
Yes, it puts a single quotes. Can you try this:
Count({1<[AssetRange]= p({1<[company]= p(company)>} [AssetRange])>}[ParticipationRate])
Is that right? I see 2 set analysis tags being opened and 3 being closed. This is what ended up working for me based on your answer above:
Count({1<[AssetRange]= p({1<[company]= p(company)>}[AssetRange]) >}[ParticipationRate])
![]()
My bad ![]()