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
Hi. I have financial data from various companies. For company A data is provided as YTD values, for company B data is provided as monthly values. This can be seeen in the value column. I wrote the following to get values from both companies on the same standard i.e. YTD format.
Solved! Go to Solution.
You can likely fix this by iterating over the companies so that the logic for each is handled separately. This might look something like this:
SUMX (
VALUES ( IS_consolidated[Company] ),
IF (
IS_consolidated[Company] = "Company B",
TOTALYTD ( SUM ( IS_consolidated[Value] ), 'Date'[Date] ),
CALCULATE ( SUM ( IS_consolidated[Value] ) )
)
)
However, the proper way to do this is to pre-process your data to standardize the data format rather than trying to deal with multiple formats simultaneously. You'll be glad you did in the long run.
The answer is the same. You'll need to iterate over the granularity you want to sum over.
Value_YTD_std_X = SUMX ( VALUES ( Company[CompanyName] ), [Value_YTD_std] )
You can likely fix this by iterating over the companies so that the logic for each is handled separately. This might look something like this:
SUMX (
VALUES ( IS_consolidated[Company] ),
IF (
IS_consolidated[Company] = "Company B",
TOTALYTD ( SUM ( IS_consolidated[Value] ), 'Date'[Date] ),
CALCULATE ( SUM ( IS_consolidated[Value] ) )
)
)
However, the proper way to do this is to pre-process your data to standardize the data format rather than trying to deal with multiple formats simultaneously. You'll be glad you did in the long run.
Thank you very much @AlexisOlson . I get your point on preprocessing the data as good practice. A follow up question if I may? Using your formula the above issue is resolved. However, I apply your formula and then take the output and standardise the signage by applying the following ruleset
For some reason I get absolute value of A + B. What I am looking for is sum of C+D. Can you help?
Thank you
The answer is the same. You'll need to iterate over the granularity you want to sum over.
Value_YTD_std_X = SUMX ( VALUES ( Company[CompanyName] ), [Value_YTD_std] )
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.