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

ASSIGN two values for the same switch measure.

Hey guys, 
Can you assign two measures to the same switch? Like this is my switch measure: 

MeasureSWTICH BNK NEW NEWW = SWITCH(MAX('Table (2)'[Type]), "2020", [2020],[2019])
Table(2) Type has two rows: 2019 and 2020. 
Columns over here ade using MTD and MTD LY, so i cant simply put the year in the legend.
This is what I get right now : 
 
 
 
 
 
 
Gediminas12_0-1606303662014.png

This is what I want basically: 

Gediminas12_1-1606303683378.png

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 
Put Date on the x axis with the 2 measures MTD and MTD LY.

 

V-pazhen-msft_1-1606461732557.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
manikumar34
Solution Sage
Solution Sage

@Anonymous , 

 

Place MTD and MTD LY on values (two measures)

 

Regards, 

Manikumar





If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




V-pazhen-msft
Community Support
Community Support

@Anonymous 
Put Date on the x axis with the 2 measures MTD and MTD LY.

 

V-pazhen-msft_1-1606461732557.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous ,

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))

last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))

 

Use that with Year from date table

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

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.