Forum Discussion
Syndicate_Admin
Administrator
4 years agoSubtract and get less previous current date quantity
Hello powerbi community, cordial greeting. Again I am here to ask for support, I am needing to create a new calculated column that brings me the difference that exists between the minor date and the...
- 4 years ago
Hi,
I tried to create similar sample data like below.
Please check the below picture and the attached pbix file.
Dif_por_dia CC =VAR currentdatevalue = Data[Cantidad_Personas]VAR currentdate = Data[Date]VAR previousdate =MAXX ( FILTER ( Data, Data[Date] < currentdate ), Data[Date] )VAR previousdatevalue =MAXX ( FILTER ( Data, Data[Date] = previousdate ), Data[Cantidad_Personas] )RETURNcurrentdatevalue - previousdatevalue
Jihwan_Kim
Super User
4 years agoHi,
I tried to create similar sample data like below.
Please check the below picture and the attached pbix file.
Dif_por_dia CC =
VAR currentdatevalue = Data[Cantidad_Personas]
VAR currentdate = Data[Date]
VAR previousdate =
MAXX ( FILTER ( Data, Data[Date] < currentdate ), Data[Date] )
VAR previousdatevalue =
MAXX ( FILTER ( Data, Data[Date] = previousdate ), Data[Cantidad_Personas] )
RETURN
currentdatevalue - previousdatevalue