Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (47.2k points)

I'm looking to compare a single Fortune 500 company's revenues (selected by the end user from a list of all Fortune 500 companies) to an average revenue for all Fortune 500 companies over time. I would like the averages to show up as bars and the single company revenues to show as a line graph (both on the same chart).

I understand how to set two different chart types on the same view. What I don't understand is how to write the calculations and parameters to give the end-user the functionality of choosing a single company and comparing it against all others.

Any suggestions on how to do this? Happy to clarify further if needed.

Thank you in advance!

1 Answer

0 votes
by (17.6k points)
  • That kind of chart can be achieved using 2 measures.

  • You need to create the measures then. The average of all is pretty straight forward, it's AVG(Revenue).

  • Using parameters, single company revenue can be retrieved. Create a parameter like [Company chosen], and put the list of all Fortune 500 (you can load from field, which helps a lot).

  • Then create a calculated field [Company revenue]:

IF [Company] = [Company chosen]

THEN [Revenue]

END

And just use the sum or avg of this measure.

  • Now, put both the measures on the worksheet and set the right chart

Related questions

0 votes
1 answer
asked Nov 30, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
0 votes
1 answer
asked Nov 25, 2020 in BI by Chris (11.1k points)
0 votes
1 answer

Browse Categories

...