Solved

Use Filter/Parameters to switch between metrics

  • 1 March 2022
  • 3 replies
  • 42 views

Hi there,

Let's say I have a table with four columns - Year, Organisation, Sales, Cost.

I want to create a slicer with two values - Sales and Cost, and an option to select only one of those.

If Sales value is selected from the slicer then I want my metric to display sum(Sales), if Cost is selected then I want sum(Cost).

Also, I'd like to use this metric to aggregate on Year/Organisation. Is this possible?

Thanks

 

icon

Best answer by Michael Ullock 1 March 2022, 23:40

View original

3 replies

Userlevel 1

Hi Filip, 

my sincere apologies about this, but would you please clarify for us what you mean by "slicer"and how you would like to select this slicer? Does the slicer refer to a filter on the Insight you want to create? From the details provided, my understanding is that you want to create 2 metricsSales and Cost. Then using these 2 metrics you would like to create a Table report. Then using an insight filter, depending on the value you select in this filter - It would display the corresponding metric value in the table report but would remove the other metric value? 

My apologies if I have misunderstood your question: But if you could please clarify for us what you mean by slicer with two values? And provide more details on what you would like to see in your report versus what you're seeing now? This would really help and once we have this clear understanding, we'll be happy to assist further.

Thank you in advance for this.  

 

Hi Michael,

thanks for the swift reply and sorry for not being more clear.

Imagine I have a table with three facts - Year ,Sales and Cost, and two attributes - Organisations.

I need exactly what you described, I need a metric that would return either sum(Sales) or sum (Cost) based on a selection of from a filter (filter is what I meant by slicer). 

I also need this metric to be able to be used in visuals together with the Organisations attribute or the Year, or the two..

Is this more clear or should I try to put screenshots of what I mean?

 

Thanks

 

 

Userlevel 2

Hi Filip,

 

It seems like Michael has provided the necessary details as to how to set this up, but unfortunately we are unfamiliar with your data and LDM. Naturally, building metrics and reports is based on the LDM in the project. So, if you could provide details as to what exactly is working when you are building this report it would help us identify where the error actually is. There is also a great free learning course on building reports and metrics at our GoodData University

Reply