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
KH11NDR
Helper IV
Helper IV

IF statement in table using measures,

Hi Guys,

 

What I'm trying to do as a measure to work in a table and probably charts too.

 

=IF(Month >= Month(Today()), Year = Year(Today()), 'Show Measure with new calculated figures','show historic sales' (Sales)

 

So

 

Jun                    :    Jul                    :             Aug

 

10                     :   15                       :      20

 

Sales field         : Sales Field             :     Calculated measure.

 

Thanks  

1 ACCEPTED SOLUTION
KH11NDR
Helper IV
Helper IV

I gave up waiting and worked it out lol, just need to add the Year bit in, which i'll sort out easily.

 

Measure 3 = if([Measure 2]>= MONTH(TODAY()),[Measure 2],[Measure 4])

View solution in original post

2 REPLIES 2
KH11NDR
Helper IV
Helper IV

I gave up waiting and worked it out lol, just need to add the Year bit in, which i'll sort out easily.

 

Measure 3 = if([Measure 2]>= MONTH(TODAY()),[Measure 2],[Measure 4])

tex628
Community Champion
Community Champion

 

Measure = 
IF([Month]>MONTH(TODAY()) && [Year]=YEAR(TODAY());
[Calculated measure];
[Historic sales]
)

 

 


Connect on LinkedIn

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.