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

Power Bi Dynamic Slicer

HI

 

I have a table with as per below:

DATE_CODEPARTNERREVENUE_TYPEHUBPRODUCTCOMPONENT_DIRECTIONCALL_COUNTDURATIONAMOUNT
01-03-2020AMOBILEEURAAAB200040000500
01-03-2020BFIXEDASIABBAB100030000200

 

Now i want to create a chart that dynamically change to either show CALL_COUNT or DURATION or AMOUNT. Whenever i tried using selectedvalues, it is not enabling me to choose either CALL_COUNT, DURATION or AMOUNT. They are not measured column rather is data value. How do i achieve this using a dynamic slicer or any other option?

 

Appreciate any help

 

regards

deven

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @dkrishnan,

You can create a new table with all measure field names and use this table field on a slicer.
After these steps, you can write a measure formula to compare current slicer seleciton and use with switch function to redirect current value to specific measure formula results.

Calculate table:

Selector= {"Measure1","Measure2","Measure3"}

Measure:

Measure =
SWITCH (
    SELECTEDVALUE ( Selector[Value] ),
    "Measure1", [Measure1],
    "Measure2", [Measure2],
    "Measure3", [Measure3],
    Sum(Table[Amount])
)

Regards,

Xiaoxin SHeng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @dkrishnan,

You can create a new table with all measure field names and use this table field on a slicer.
After these steps, you can write a measure formula to compare current slicer seleciton and use with switch function to redirect current value to specific measure formula results.

Calculate table:

Selector= {"Measure1","Measure2","Measure3"}

Measure:

Measure =
SWITCH (
    SELECTEDVALUE ( Selector[Value] ),
    "Measure1", [Measure1],
    "Measure2", [Measure2],
    "Measure3", [Measure3],
    Sum(Table[Amount])
)

Regards,

Xiaoxin SHeng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

You need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.