cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Route111
Helper IV
Helper IV

Measure to show month and year in card visual based on slicer selection

Hi Experts

 

i need a DAX measure to show i the card the month name (sort format i.e. Jan) and the Year based on my slicer selection. So if i selected Jan from the month sclier and 2021 from the year sclier the show in the card 

Jan 2021

 

1 ACCEPTED SOLUTION
SivaMani
Super User
Super User

@Route111 , Try the below measure
Year-Month =
VAR __Month =
IF ( HASONEVALUE ( Table[MonthName] ), VALUES ( Table[MonthName] ) )
VAR __Year =
IF ( HASONEVALUE ( Table[MonthName] ), VALUES ( Table[Year] ) )
RETURN
__Month & " " & __Year

View solution in original post

1 REPLY 1
SivaMani
Super User
Super User

@Route111 , Try the below measure
Year-Month =
VAR __Month =
IF ( HASONEVALUE ( Table[MonthName] ), VALUES ( Table[MonthName] ) )
VAR __Year =
IF ( HASONEVALUE ( Table[MonthName] ), VALUES ( Table[Year] ) )
RETURN
__Month & " " & __Year

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors
Top Kudoed Authors