Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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
Stachu
Community Champion
Community Champion

add this measure

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

you should actually disable slider interaction with this chart

Capture.PNG



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

3 REPLIES 3
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

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

1.PNG

 

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
    )
)

2.PNG

 

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.
Stachu
Community Champion
Community Champion

add this measure

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

you should actually disable slider interaction with this chart

Capture.PNG



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Anonymous
Not applicable

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?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.