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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
0Experience
Helper I
Helper I

How to show multiple year in a single card

Hello Everyone,

 

I've got a chart showing data for three years and their values. Also, there are two cards showing the year and its count/value. For example, for 2022.

0Experience_0-1714739737008.png

When I select all three years, the "sum of count" card shows the total count right, but the year card only shows one year. I know I can set it to show the first or last year.

0Experience_1-1714739840501.png

But, can it show "2021, 2022, 2023" when I select all three years? And when I pick just one year, it shows that year and its value. If I choose multiple years, it shows all those years and the total count?

 

Power bi file (Google Drive)

Thank you 

 

 

1 ACCEPTED SOLUTION
Alex87
Solution Specialist
Solution Specialist

Hello,

This DAX measure should do the trick.

 

Selected Years = 
CONCATENATEX(VALUES('MyData'[Year]), 'MyData'[Year], ", ", 'MyData'[Year], ASC)

 

Alex87_0-1714741779817.png

 

If it answers your need, please mark my reply as the solution. Thanks!

View solution in original post

2 REPLIES 2
Alex87
Solution Specialist
Solution Specialist

Hello,

This DAX measure should do the trick.

 

Selected Years = 
CONCATENATEX(VALUES('MyData'[Year]), 'MyData'[Year], ", ", 'MyData'[Year], ASC)

 

Alex87_0-1714741779817.png

 

If it answers your need, please mark my reply as the solution. Thanks!

Thanks @Alex87 

 

It works

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.