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
srlabhe123
Post Patron
Post Patron

Dynamic Filters on Dimension and Measures

Hi All,

I want to display the diimension and their measures based on selection in the Table Visual.

Like below Delivery Type, Brand, Manufacturer .... Materials these all are dimenssions and

SKUs, SKUs LY,SKUs YoY,Sales,Sales LY and so on are measures.

 

 

 

Slicer_Image.JPG

 

I want to have above filters where user can select whatever dimensions and measures they want to see in Table Visual.

For Ex :- If user selects Dimenssion Delivery Type and measures SKUs, SKUs YoY so only these 3 fields should display in tabel visual.

 

Kindly help, please note the dimensions and measures are from same query.

21 REPLIES 21
parry2k
Super User
Super User

I don;t think it is possible but here is hack to do it but will not very pretty

 

Here is high level how you can do it:

 

1. Add two tables with Dimension and Measures name in it.

2. Put these as field as slicer

3. Each of your dimension and measure will have if condition , for example "Deliver Type" dimension will be condition like 

    Delivery Type = IF(SelectedValue(TableDimension[DimensionName]) = "Delivery Type", Table[Delivery Type], BLANK()). You have to do it for every dimension/measure

4. Add table visual, drop all dimension/measures in table

 

Based on value selected in the slicer, you will see only selected dimension/measures values will show up in Table, and others will be blank.

 

Here is why it will not look pretty:

 

1. Header for all dimension/measures will be always visible.

2. All the columns in table will not be next to each other, so there will be gap in the table depending

 

Thanks,

P



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Can isue Swicth in stead of if so that I can do it in single siwtch statement like blow:

SWITCH(SelectedValue(TableDimension[DimensionName]), "Delivery Type", Table[Delivery Type],and so on

unfortuantely i don';t think switch will work on this, and I also thing selectedvalue is going to work , I just gave you an idea, selectedvalue only works if user select one value in the slicer.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Created a below column 

SelectedDim = IF(SELECTEDVALUE('Dimensions'[Dimensions])="Delivery Type",KPI_Sales[Delivery Type],"NUll") 

 

when I select Delivbery Type in slicer below it still does not refletc Delivery Type with its values form main table.Deltype.JPG

 

It seems Selected Value is not working for single value too.

 

Thanks

 

 

please add it as measure



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

my mistake, yes, we need aggregation

 

if("Delivery Option" IN VALUES(TableDimension[DimensionName]), MAX(Table[Delivery Option]), BLANK())

You can work on this proposed solution but I don';t think it is very scalable and good approach, although at the same time I don't see any other solution.

 

I will leave it upto you to make a decision to see if you want to continue on this path 🙂



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Smiley Sad

I know, give it a try , may be it worked out.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Trying for same... since morning 

I hear ya, so are we getting somewhere or still need further help.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

we need help, am trying to serach online for same...

what happened to proposed solution, did you tried it?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I cant use aggrgated function as I need whole olumn value to display

Hi @srlabhe123,

Have you resolved your issue? If you have, welcome to share your solution or mark the right reply as answer. More people will get useful information from here.

 

Thanks,
Angelia

Hi Guys,

 

I found an interesting and useful solution by Angelia, where we can do a Dynamic Selection on Measures list.

We could achieve Dynamic Dimension Selection as well with Quick work around.
You can refer by blog....
https://wordpress.com/post/gunaseelangnanavadivel.wordpress.com/23

 

Happy learning!
Thanks.

Guna

@gnanavadivel100link doesn't open, although I already did it recently but would like to see what are the other methods.

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @srlabhe123,

Please create a table inclusing dimension value, create another measure using switch function. More details, please review this blog.

Best Regards,
Angelia

Adding it as measure will ask me to specify aggrgation....but I want that whole coulmn to display after selection and not aggrgated value.

Instead of selectedvalue you need to check following and that will take care if use selected more than one value in slicer:

 

if("Delivery Option" IN VALUES(TableDimension[DimensionName]), Table[Delivery Option], BLANK())


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.