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
v-pussah
Employee
Employee

Dynamic Column values based on Slicer Selection

Looking for a solution for the below given problem:-

 

I have a around 12 columns in a dataset which are plotted in a line chart. Out of this 8 are P1 and 4 are P2 category.

 

I need to slice these value sin line chart based on the categories (P1 and P2) in such a way that it only shows 4 P2 on selection of P2 or vice-versa.

 

I created a custom table with 2 columns having features and categories and wrote Switch statement on the selected value, but it’s not working.

 

Selection = SWITCH(TRUE(),

SELECTEDVALUE('Feature Selection'[Features]) = "ThirdPartyActiveUsage", SUM(TenantData[Third Party Active Usage]),

SELECTEDVALUE('Feature Selection'[Features]) = "CAActiveUsage", SUM(TenantData[CA Active Usage]),

SELECTEDVALUE('Feature Selection'[Features]) = "AppProxyActiveUsage", SUM(TenantData[AppProxy Active Usage])

)

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

@v-pussah 

 

You may aslo try Unpivot Columns in Query Editor, then take advantage of the Legend field.

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

View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@v-pussah 

 

You may aslo try Unpivot Columns in Query Editor, then take advantage of the Legend field.

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

Unpivoting is the solution, but the problem is size of data. by unpivoting it has 25M rows.

AiolosZhao
Memorable Member
Memorable Member

Hello @v-pussah ,

I think you can use the bookmark function to do it.

Create two tables, one for P1, one for P2, and create two markers for these two tables.

Next, create a column with two values, such as: P1 and P2.

Click P1 for bookmarks, P2 for markers, and for the button, you can use force selection.

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@v-pussah,The information you have provided is not making the problem clear to me. Can you please explain with an example. Can you share sample data and sample output.

Appreciate your Kudos.

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.