cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Plot a graph using slicer outcomes

I have a slider slicer that changes a value on a card.

I'd like to plot every 10 points of the slider slicer to the card values on a line graph.

For example, when I move the slider slicer to:

0-499 the value on the card is 33'890;

10-499 the value on the card is 25'260;

20-499  the value on the card is 18'570;

30-499  the value on the card is 15'160;

40-499 the value on the card is 13'560...

So I'd like to plot on a line graph:

0, 33'890

10, 25'260

20, 18'570

30, 15'160

40, 13'560

Etc

I can do this manually but where's the fun in that? This has been a head scratcher for a few days now and I can't find anything about what I'm trying to achieve online so I'd really appreciate the help and will send coffee and donuts to anyone with a solution (that's a promise)

I have a demo file here: http://zensource.co.uk/SLIDER_MAGIC_BI.zip

And a demo graphic (values inverted for clarity) here:

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

## Re: Plot a graph using slicer outcomes

```Measure =
VAR _WhatIf = MAX('Unique'[WhatIf])
RETURN
CALCULATE(DISTINCTCOUNT('1_INSTALLS'[Machine]),'Unique'[WhatIf]>_WhatIf)```

you should actually disable slider interaction with this chart

3 REPLIES 3
Super User

## Re: Plot a graph using slicer outcomes

```Measure =
VAR _WhatIf = MAX('Unique'[WhatIf])
RETURN
CALCULATE(DISTINCTCOUNT('1_INSTALLS'[Machine]),'Unique'[WhatIf]>_WhatIf)```

you should actually disable slider interaction with this chart

Community Support Team

## Re: Plot a graph using slicer outcomes

Hi @billybee,

Create an extra table with below Power Query. Remember to set the data type to "Whole Number" for [Column1].

Then, in data view, add a calculated column in above table.

```Column2 =
CALCULATE (
DISTINCTCOUNT ( '1_INSTALLS'[Machine] ),
FILTER (
ALLSELECTED ( 'Unique' ),
'Unique'[WhatIf] >= EARLIER ( Query1[Column1] )
&& 'Unique'[WhatIf] <= 499
)
)```

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor

## Re: Plot a graph using slicer outcomes

Thanks Stachu,

I've inverted the graph using the following logic... is this the easiest way?

```Measure =
VAR _WhatIf = MAX('Unique'[WhatIf])
VAR y = VALUE(CALCULATE(DISTINCTCOUNT('1_INSTALLS'[Machine]),All('Unique'[WhatIf])))
RETURN
CALCULATE(y-DISTINCTCOUNT('1_INSTALLS'[Machine]),'Unique'[WhatIf]>_WhatIf)```

Also, where can I send the coffee and donuts to?