Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I need SUBTRACT the column [COD] line by line> Example> LINE2 - LINE1; LINE3 - LINE2; LINE4 - LINE3 ....
but column [COD] is MEASURE and i do not know how i make it.
@Anonymous I just want to confirm how do you determine whats Line 1 and whats Line 2?
You could create a column for previous day/period COD and then another column which is difference of the 2.
=CALCULATE(SUM[COD], DATEADD(TableName[DateField],-1,day))
OR
You could get values using the previousday function. https://msdn.microsoft.com/en-us/query-bi/dax/previousday-function-dax
OR
If you dont know the last date you could calculate previous period using
Last=
VAR LastPeriod= CALCULATE (MAX ( FactName[DimDateKey] ),
FILTER (FactName, FactName[DimDateKey] <> ( FactName[DimDateKey] )))
RETURN LastPeriod
@Anonymous But COD is INT not DATE .
I need FILTER DATE and DES_COMPT_PARAD and CALCULATE [COD]Line 2 - [COD]Line 1 ; [COD]Line 3 - [COD]Line 2 and etc
@Anonymous I know, that is why I am using it as a sum and not the date field.
@Anonymous I tried and I could not . Can you help ? https://drive.google.com/open?id=1205YLHc1xOjbBftFsJHM2q3irI2X6KbF
Hi @Anonymous,
What is the formula for the COD.
I also think you cant use Earlier to grab the previous information, but I need to know what COD is before giving a try to the final formula.
Ninter
Hi @Interkoubess this formula COD is :
COD = CALCULATE (min('CORRIDAS'[COD_IDENT_CORRI]);
FILTER (
'CORRIDAS';
'CORRIDAS'[DTH_INIC_CORRI] < MIN ( 'PARADAS'[DTH_INIC_PARAD] )
&& 'CORRIDAS'[DTH_FIM_CORRI] > MIN ( 'PARADAS'[DTH_FIM_PARAD] )
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |