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
SS1
New Member

can't get correct results when referencing a metrics in table columns

Hello all,

I have a metric:

Selected Year = SELECTEDVALUE(DateKeyModel[Year],2000)
If I use this metric in chart, the result is correct(the result should be the year which I selected in the slicer).
But if I use this metric in a column, it returns 2000, instead of I selected year.
My DAX in column as below:
c_name =
  var y= [Selected Year]
  return y

Please kindly support, thanks in advance!
3 REPLIES 3
SS1
New Member

@Fowmy  generally, I would like to show selected year/month in the column title of my table chart, is it possible?

Fowmy
Super User
Super User

@SS1 

While creating a table or calculated column in Power BI, capturing slicer selections in real-time isn't feasible. Power BI constructs tables and columns before making them available on the report canvas. To assist you more effectively, kindly explain your requirements clearly, furnish sample data, and outline the expected outcome. This will enable a tailored solution to meet your specific needs. An approach using Measures should work in your case.


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks Fowmy, I just covered the content with a card chart.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors