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
Chandra_maha
Helper I
Helper I

How to Select Column dynamically in Table graphics according to Date

Hi Everyone,

 

I am trying to select the Column Dynamically in Table graphics according to Date.

 

Ex -  I have data for various countries with respect to Month. However, Month data is entered as shown below.

Chandra_maha_0-1672653181344.png

I am creating a table visual, where I want to see the data for the current month only.  Following should be the output

 

Chandra_maha_1-1672653385828.png

For January, I should get the data for Jan 23, and for February, I should get the data of Feb 23. This process should happen dynamically. 

 

I tried a few ways but could not get it.

 

Thank you. 

 

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

Hi @Chandra_maha ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1672813182837.png

Please try:

Unpivot the Date columns:

vjianbolimsft_1-1672813226449.png

Then create a measure:

Measure = IF(LEFT(MAX('Table'[Attribute]),3)=FORMAT(TODAY(),"MMM"),1,0)

Apply it to the visual:

vjianbolimsft_3-1672813487812.png

Final output:

vjianbolimsft_2-1672813472001.png

Best Regards,

Jianbo Li

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

5 REPLIES 5
v-jianboli-msft
Community Support
Community Support

Hi @Chandra_maha ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1672813182837.png

Please try:

Unpivot the Date columns:

vjianbolimsft_1-1672813226449.png

Then create a measure:

Measure = IF(LEFT(MAX('Table'[Attribute]),3)=FORMAT(TODAY(),"MMM"),1,0)

Apply it to the visual:

vjianbolimsft_3-1672813487812.png

Final output:

vjianbolimsft_2-1672813472001.png

Best Regards,

Jianbo Li

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

Anonymous
Not applicable

This will work if I opt for the slicer. However, I need to reflect the column with respect to current month dynamically. 

Thennarasu_R
Responsive Resident
Responsive Resident

Hi !
@Chandra_maha 
You Can use Field Parmeters .
Thanks ,
Thennarasu 

Thank you @Thennarasu_R for suggesting the "Filed Parameter".  If I use that, then I have manually selected the Column of various months every time where there is a change in Month.

 

Is there a way, the month gets selected or changes dynamically with a date?

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.