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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
ronaldbalza2023
Continued Contributor
Continued Contributor

Dax Measure

Hi everyone, would like to have a DAX measure in the following scenario below. Appreciated your help on this in advance 🙂

 

Problem statement: Basically, I am tracking if the target revenue is met every quarter. I have a measure with the name of Revenue and Target. So, any shortfall from a prior quarter (if the Revenue is less than the Target), the shortfall amount will be carried forward and applied to the current quarter.

 

Let's say in Q1, I have revenue of 3000 and a target of 5000. Come next Q2 (basically, the target is not met), the shortfall amount in Q1 is 2000 (5000 - 3000), it will be then the starting revenue of Q2.

 

Hope this makes sense 🙂. Attached is the Sample Data 

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

There, @ronaldbalza2023

It looks like you have the solution in another thread you posted.

IF revenue > target in Q1

THEN Revenue Q2 = Revenue

ELSE revenue < target in Q1

THEN Revenue Q2 = Revenue minus Target

Assuming you have only selected 1 year:

Projected revenue =

VAR _SelectedQuarter = SELECTEDVALUE(DimDate[Quarter])

RETURN

IF( [Revenue] > [Target] , [Revenue], [Revenue] - [Target] )

if this question has been resolved consider marking this thread as answered due to thread duplication

https://community.powerbi.com/t5/Desktop/DAX-Measure/m-p/2331876

Best regards
Community Support Team _ Zeon Zheng

If this post helps, consider Accepting it as the solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

There, @ronaldbalza2023

It looks like you have the solution in another thread you posted.

IF revenue > target in Q1

THEN Revenue Q2 = Revenue

ELSE revenue < target in Q1

THEN Revenue Q2 = Revenue minus Target

Assuming you have only selected 1 year:

Projected revenue =

VAR _SelectedQuarter = SELECTEDVALUE(DimDate[Quarter])

RETURN

IF( [Revenue] > [Target] , [Revenue], [Revenue] - [Target] )

if this question has been resolved consider marking this thread as answered due to thread duplication

https://community.powerbi.com/t5/Desktop/DAX-Measure/m-p/2331876

Best regards
Community Support Team _ Zeon Zheng

If this post helps, consider Accepting it as the solution to help other members find it more quickly.

parry2k
Super User
Super User

@ronaldbalza2023 what is your expected output?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k , thanks for taking the time on this. The output is dynamic depending on whether the target revenue is met or not. If the target is met, then the revenue of Q2 will be the starting point, if the target revenue is not met, then whatever the shortfall amount of the previous quarter will be the starting point of the revenue in the next quarter. Thanks 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.