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

DAX: Measure to Calculated Column

Hi all,

 

I'm trying to create a calculated column from this measure:

Build Up 3 Months = CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = MONTH(MAX('Demand Waterfall'[Year Month])))) + CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = MONTH(MAX('Demand Waterfall'[Year Month]))+1)) + CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = MONTH(MAX('Demand Waterfall'[Year Month]))+2)) - SUM('Final Unconsumed Demand'[Total Final Unconsumed Dd Amt (USD)])
 
Thank you in advance!
1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous \

You can use earlier to filter sum([DP dollar]) by month.


Build Up 3 Months =
CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = EARLIER(MONTH('Demand Waterfall'[Year Month]))))

+ CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = EARLIER(MONTH('Demand Waterfall'[Year Month]))+1))

+ CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = EARLIER(MONTH('Demand Waterfall'[Year Month]))+2))

- 'Final Unconsumed Demand'[Total Final Unconsumed Dd Amt (USD)]

 

 

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

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@Anonymous \

You can use earlier to filter sum([DP dollar]) by month.


Build Up 3 Months =
CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = EARLIER(MONTH('Demand Waterfall'[Year Month]))))

+ CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = EARLIER(MONTH('Demand Waterfall'[Year Month]))+1))

+ CALCULATE(SUM('Demand Waterfall'[DP Dollar]), FILTER('Demand Waterfall', MONTH('Demand Waterfall'[Waterfall Date]) = EARLIER(MONTH('Demand Waterfall'[Year Month]))+2))

- 'Final Unconsumed Demand'[Total Final Unconsumed Dd Amt (USD)]

 

 

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

richbenmintz
Solution Sage
Solution Sage

Hi @Anonymous , 

 

Would you be able to provide, sample data, expected results, and a sample .pbix, would go a long way in helping the community get this question answered for you.

 

Thanks



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


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.