Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Shivayogi123
Regular Visitor

Dynamicaly select column and filter based on slicer value

Hi Team,

 

I have month slicer which has list of values from Jan to Dec.

I have column which has names and 12 different columns as below :

Shivayogi123_0-1666788758446.png

 

When i select month in slicer i need to apply filter on specific month solumn which ha "Y"

As an example if i select January in slicer

Shivayogi123_1-1666788841476.png

 

I need to filter the table as below for January column

Shivayogi123_2-1666788889446.png

 

Same for Feb and other months.

Unpivoting the month columns fixes the issue but i dnt want that as my row count is in crores.

Can i filter on the existing table or can i create a new table (Summarised table like that) which has only the selected month filtered with Y on that selected month.

I have tried the below to get the selected month:

Sel_month = SELECTEDVALUE(Sheet1[Date]).
 
I am trying something like :
 
If(Sel_month = "January",CALCULATETABLE(Sheet1,Filter(Sheet[Jan] = "Y")),
If(Sel_month = "February",CALCULATETABLE(Sheet1,Filter(Sheet[Feb] = "Y")),
 
Atached is the pbix i tried and please let me share your thoughs on the same.
 

 

1 REPLY 1
amitchandak
Super User
Super User

@Shivayogi123 , Calculatetable will not take the slicer value.

 

I think field parameters can help

https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors