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
Anonymous
Not applicable

Get distinct years in title of a chart

Hi all,

 

New to the forum! so pardon me if my questions are not clear.

 

I have a year column which has 2020, 2019, 2018 and so on. I have a matrix chart whcih shows some detailed view of information.

 

My question is, How do i get the above years in the title of matrix chart so that users are informed that they are seeing infomation for these years?

 

Please help me.

6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous , Not very clear. You can give year in the Column of matrix

 

https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/

 

Can you share sample data and sample output in table format?

Anonymous
Not applicable

Please see the below image. in the line chart i have years showing based on a filter applied with measure "check measure"

 

CheckMeasure = IF(MAX(table[Year])>(MAX(dimdate[YearL])-3) && MAX(table[Year])<=MAX(dimdate[YearL]),1,0)
 
This measure takes the year from the "table[Year]" and find last 2 years and plot thier monthly values in the line chart.
 
in the title highlighted below "Bill Rate by Specialities :- All Years" instead of "All Years" i want to show the years which are in the line chart.
 
 

LP280388_0-1597304556649.png

 

 

Create a measure to get all concatenated year values 

 

Title = "Data of " & CONCATENATEX(DISTINCT(Date[Year]), Date[Year], ",") 

 

 

Then right click on title and click "Conditional Formatting"

DynamicTitle.png

 

 

Then Select "Title" in Based on Field

DynamicTitle-2.png 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Anonymous
Not applicable

@FarhanAhmed Thanks. I did the same. But this measure gives all the years like 2020,2019,2018,2017,2016 when there is no selection made. I would like to show only the years showing in the line chart that is 2020,2019, 2018 only. 

Hi @Anonymous ,

 

Would you please try to use:

 

 

Title = "Data of " & CONCATENATEX(DISTINCT(Table[Year]), Table[Year], ",") 

 

 

Best Regards,

Dedmon Dai

Try this, including Crossfiltering to get only years from Fact Table.

 

Title = "Data of " & CALCULATE(CONCATENATEX(DISTINCT(Date[Year]), Date[Year], ",") ,CROSSFILTER('Date'[Date],table[Date],Both))

 

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




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.