Forum Discussion
shamim20
6 years agoNew Member
Calculated column based on two other column
Hello altruists, Need some help here. I have 3 columns of data with millions of rows ( File, record and Time). Each file may have multiple records. Would like to create 4 new columns calculating t...
- 6 years ago
shamim20 add four measures, here is example of 0 - 1
Diff 0 to 1 = VAR __filter = ALLEXCEPT ( 'Table', 'Table'[File] ) VAR __valStart = CALCULATE ( [Sum], __filter, 'Table'[Record] = 0 ) VAR __valEnd = CALCULATE ( [Sum], __filter, 'Table'[Record] = 1 ) RETURN __valStart - __valStart
shamim20
6 years agoNew Member
Hi,
Thanks for your reply. What are you referring to as sum here >>
[Sum]
shamim20
6 years agoNew Member
This is what I ahve at the end
Diff 0 to 1 =
VAR __filter = ALLEXCEPT ( 'Table', 'Table'[File] )
VAR __valStart = CALCULATE ( SUM(TABLE.Time), __filter, 'Table'[Record] = 0 )
VAR __valEnd = CALCULATE ( [SUM(TABLE.Time),__filter, 'Table'[Record] = 1 )
RETURN
__valStart - __valStart