March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
So I'm trying to create a YTD measure and this is :
Solved! Go to Solution.
Hi @DouweMeer,
In your first formula, we can only get the max year or the current row by max ( [INVOICE_DT] ). So we should update your formula as below.
Sales this year = VAR _maxyear = YEAR ( MAXX ( ALL ( yourTABLE ), [INVOICE_DT] ) ) RETURN CALCULATE ( SUM ( 'Price_Realisation'[USD Conversion] ), FILTER ( 'Price_Realisation', 'Price_Realisation'[YTD year] = _maxyear ) )
If any other issue, kindly share your sample data and excepted result to me, if you don't have confidential data? Please upload your file to One Drive and share the link here.
Regards,
Frank
Hi @DouweMeer,
In your first formula, we can only get the max year or the current row by max ( [INVOICE_DT] ). So we should update your formula as below.
Sales this year = VAR _maxyear = YEAR ( MAXX ( ALL ( yourTABLE ), [INVOICE_DT] ) ) RETURN CALCULATE ( SUM ( 'Price_Realisation'[USD Conversion] ), FILTER ( 'Price_Realisation', 'Price_Realisation'[YTD year] = _maxyear ) )
If any other issue, kindly share your sample data and excepted result to me, if you don't have confidential data? Please upload your file to One Drive and share the link here.
Regards,
Frank
That actually looks very logical. I notice more and more that even though DAX looks a lot like Excel, it isn't Excel :). Thanks.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |