Forum Discussion
Time Intelligence: Previous Month Value is Incorrect
- 4 years ago
Hi VikrantC ,
I do not have access to the link you shared, please use SharePoint Online or other tools to share your file.
Based on my understanding, I created the following example data.
1. Then create the measure to calculate the month end score value and compare it to the previous month end.
MonthEndScore = CALCULATE ( SUM ( 'Table'[Score] ), FILTER ( 'Table', 'Table'[Date] = EOMONTH ( 'Table'[Date], 0 ) ) )Score% = IF ( [MonthEndScore] <> BLANK (), DIVIDE ( [MonthEndScore], CALCULATE ( [MonthEndScore], FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = EOMONTH ( MAX ( 'Table'[Date] ), -1 ) && 'Table'[Player] = MAX ( 'Table'[Player] ) ) ), 1 ) - 1 )2. Create the measure to calculate X1*Y1^2.
X1*Y1^2 = CALCULATE ( SUM ( 'Table'[Score] ), 'Table'[Player] = "X1" ) * CALCULATE ( POWER ( SUM ( 'Table'[Score] ), 2 ), 'Table'[Player] = "Y1" )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 4 years ago
Hi VikrantC ,
Sorry for the late reply. Please try the following formula:
Measure = CALCULATE ( [Score%], 'Table'[Player] = "X1" ) * CALCULATE ( POWER ( [Score%], 2 ), 'Table'[Player] = "Y1" )Best Regards,
Winniz
Hi Amit,
Thank you very much. I used a similar formula. However, I am still stuck with "The second problem I am having is I want to Filter X1 and X2 (on date) and use variable to calculate Sum of X1, or (X1*Y1^2). Please see the sample data in the file below". The X1 and X2 have same dates and values.
If I have two variables (X1 and X2) with dates and values (3 columns total). How do I manipulate the formula. For example, I want to SUM (X1^2*X2). Basically, for each specific dates I want to calculate X1square and multiply it with X2, Ideally, I want this to be a variable so that I can use it as part of other DAX formula.