cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Rtum
Regular Visitor

Slicer for Multiple Measures

Hi All,

I have a  Slicer that dynamically selects Measures.I was able to achive this for a Single Measure but now i have to display 4 measures when single measure is selectedin slicer .How do I achive this.?

Eg:when Count of Items is selected in the slicer,the graph should display 4 measure(one month Avg,two month avg....) line need to displayed.  for Count of Items

 

I was able to do it for single measure and single calculation using the below 

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

 

Steps done so far:

1)Create a table with measure to be displayed in Slicer.

2) Create a  Measure column for 1 Month Avg (which Includes switch for the 6 measure) as shown below

SWITCH([Selected Measure Avg],[Item Count ],CALCULATE(SUM(Tab1[c1]),(T1[c2]>0),
ALLEXCEPT(T1,T1[C3],T1[C4]))/CALCULATE(SUM(T1[C1]),(T1[C5]=0),ALLEXCEPT(T1,T1[C6])),

[Product Countl],............),

3)Replicated the same for 3 month Avg ,6month Avg and 12 month Avg..........

 

When i select Item count in slicer,I get only only one line showing the 1 month avg...

 

 

Regards,

Raj

 

 

3 REPLIES 3
Eyelyn9
Community Support
Community Support

Hi @Rtum ,

 

I think this scenario is currently not supported.

In SWITCH(), one  condition has one value. And measure  always returns a single value.

=SWITCH(MAX('Selection'),"1 Month",[M1],"2 Month",[M2])

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Rtum ,Based on what I got

That means 4 measure has to be created using the measure slicer

 

So 4 measure has use the value of slicer

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!
!! Subscribe to my youtube Channel !!

Yes, when i select  Item Count from Slicer,I need the graph below to show me four lines (1Month Avg,3 Month Avg,6 month Avg,12 month avg)....

 

I created 4 measures(one for each month Avg) using switch ( for 6 slicer measures)...anything i am missing?

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

Power BI Dev Camp Session 22 with aka link 768x460.jpg

Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!