1

I have a lengthy expression like this:

$(vUseHotlist) * number_of_bids_from_hotlist + 
$(vUseStocklist) * number_of_bids_from_stocklist + 
$(vUseDashboard) * number_of_bids_from_dashboard

I want to use this in multiple charts, and I tried defining it in a master element, but I cannot get it to work.

I want to avoid copy and pasting the code everywhere, because it becomes unreadable. Any ideas how to solve it? I have found information on how to use aggregated master elements (e.g. with a sum() function), but not for unaggregated expressions.

FYI, the variables used above are all either 0 or 1.

Thanks.

asked Sep 10, 2024 at 20:32

1 Answer 1

1

After a lot of trial and error I was able to resolve it. Instead of using master elements measures for this, you should define a variable with the code.

Then you can use it like this in a graph.

Sum($(MYVARNAME))

answered Sep 11, 2024 at 5:12
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.