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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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