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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
AlexAlberga727
Resolver II
Resolver II

Suppressing Future Dates - When reviewing % Change

Hey Everyone!

 

My goal - To compare change from prior year.

 

I'm currently calculating a % of change from the Prior Year with the below Formula. I included an IF statement in hopes to supress future dates from the calculations.

 

% Change in Rev_ = 
IF( 
    AND( 
    [Total Revenue PY] = 0, 
    [Total Revenue] = 0),
        BLANK(),

IF( 
    AND(
    [Total Revenue PY] = 0,
    [Total Revenue] > 0),
1,

IF( LASTDATE( dDateTable[Date] ) > TODAY() , BLANK(), 

( [Total Revenue] - [Total Revenue PY] ) / [Total Revenue PY] )))

 

My Issue - 

The formula is identifying the last record in the data. If filtered to current month the LastDate = EoM Date. Therefore I am only able to review date ranges which have past.

 

If today was within the first week of the month - I'd like to compare up to that date. I don't want to see that the change in rev from last year is negative because we are only a couple days within the month. 

 

Is there a way to create a measure that would handle the same calculation - But instead would ask:

IF Record is > TODAY opposed to asking is LASTEDATE > TODAY.

 

If there are better wats in handling this, please let me know. Thanks!

 

 

 

 

1 REPLY 1
Greg_Deckler
Super User
Super User

Didn't quite get this one. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors