Forum Discussion
Anonymous
6 years agoNot applicable
undefined
So I habe data like this. Date. Type Value 19/1/2020 A 12 19/1/2020 B 20 20/1/2020 A 40 20/1/2020 B 20 . . I want to calculate A - B and plot it on a graph. I can't write Type = A in a formul...
vivran22
6 years agoCommunity Champion
Hello Anonymous ,
What is the expected result? Will your data has two records for each date?
Cheers!
Vivek
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter
Anonymous
6 years agoNot applicable
Yes every different type (A. B, C) have data for each date.
Expected result
Date Result
19/1/2020. -12
20/1/2020. 20
- vivran226 years agoCommunity Champion
Anonymous
You may try this:
Reuslt = VAR _FirstValue = FIRSTNONBLANK( dtTable3[Value], MAX(dtTable3[Date]) ) VAR _LastValue = LASTNONBLANK( dtTable3[Value], MAX(dtTable3[Date]) ) VAR _Difference = _FirstValue - _LastValue RETURN _DifferenceCheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter