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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! 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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors