cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PrinceII
Frequent Visitor

Slicer with measures that controls the same measures in graph

I have created this graph and a slicer with the same measures. Now I want to control with the slicer the measures. So I want to select for instance actual cumulative and target cumulative so that only these will show in the graph like they are now showing in the graph 1

 

Graph1

PrinceII_0-1632138589708.png

 

Example DAX of 1 measure I created

Planned cumulative =
var _ac = countx(filter(allselected('Measure'), 'Measure'[Metric] ="Planned Cumulative"),'Measure'[Metric])
return
CALCULATE(
    SUM('ISOD vwISO Actual vs Planned 2'[Planned]),
    FILTER(
        ALLSELECTED('ISOD vwISO Actual vs Planned 2'[NextFridayDate]),
        ISONORAFTER('ISOD vwISO Actual vs Planned 2'[NextFridayDate], MAX('ISOD vwISO Actual vs Planned 2'[NextFridayDate]), DESC)
     )
)
 
How am I able to use the slicer that shows the selected measures in the graph like the visual (but then only the ones I selected)
 
The slicer is a table created with only the names of the easures used in the graph

 

 

 

2 REPLIES 2
v-xulin-mstf
Community Support
Community Support

Hi @PrinceII

 

Is your issue solved?

If the issue has been solved, please adopt the solution to help others.

Thanks!

 

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

 

Greg_Deckler
Super User
Super User

@PrinceII So typically you would have a disconnected table for you slicer and then do something like:

Measure =
  VAR __Selected = 'SlicerTable'[Measures]
RETURN
  IF("Measure" IN __Selected,
    <calculation>,
    BLANK()
  )

@ me in replies or I'll lose your thread!!!
Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
YouTube Channel! Microsoft Hates Greg
Check out my latest book!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.