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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.