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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.