cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Resident Rockstar
Resident Rockstar

@Anonymous , 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
Resident Rockstar
Resident Rockstar

@Anonymous , 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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors