Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm using a line chart to show data points for multiple alternate states. For each measure I need to include the alternate state in the expression. I want to sum(sales) only if they were ([Rank]=1) and use the "Company 1" alternate state.
sum({$<Rank={1},"Company 1">}Sales) - Tried this but no luck. Also tried If Then statement with no luck.
Thanks in advance!
Replace the $ with the Alternate State name like this:
sum({[Company 1]<Rank={1}>}Sales)
Replace the $ with the Alternate State name like this:
sum({[Company 1]<Rank={1}>}Sales)
Perfect! This community is great. Now what if I wanted to use the company selection as the label name in the chart?
=' '&GetCurrentSelections(chr(13)&chr(10), '=', ',' ,9,'Company 1')
I tried that but it puts the name of the dimension in front of the company name.
Not sure I follow how the expression you posted is working.
You may want to try GetFieldSelections(FieldName) or wrap the whole thing with a Replace function to replace 'Company=' with ''.
Think I resolved the label issue by using:
=Only ({'Company 1'} Name_Bidder)
But the label now shows up as - which is better than where I was at before. Is there a way for making the label not show unless a selection is made from the alternate state?
Thanks for answering my first question, it got me on the right path. I will update as Solved.
I should clarify, it shows a dash if there isn't a selection. The company name shows once a selection is made. I want the label not to show if no selection is made ie get rid of the dash.
Try this:
=if(GetSelectedCount(Name_Bidder,True(),'Group 1')>0,Only ({'Company 1'} Name_Bidder),'')