Hello!
I have a report in which you need to perform the following calculations for each Product:
With the following structure:
And that in the end you can organize for each product the High Date, Low Date (if there is no product cancellation date, it will be blank) with the following structure:
Thanks a lot!
Solved! Go to Solution.
Hi @Syndicate_Admin ,
Here are the steps you can follow:
1. Create calculated column.
maxgroup_date =
var _max=MAXX(FILTER(ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&'Table'[TipoDeSolicitud]=EARLIER('Table'[TipoDeSolicitud])),[FechaSolicitud])
return
IF(
'Table'[TipoDeSolicitud]="Alta",_max)
maxdate =
var _maxdate = MAXX(ALL('Table')
,[FechaSolicitud])
return
IF(
'Table'[TipoDeSolicitud]="Baja",_maxdate)
2. Create calculated table.
Table 2 =
SUMMARIZE(
'Table',
'Table'[Product],
"FechaAlta",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxgroup_date]),
"FechaBaja",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxdate])
)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Syndicate_Admin ,
Here are the steps you can follow:
1. Create calculated column.
maxgroup_date =
var _max=MAXX(FILTER(ALL('Table'),
'Table'[Product]=EARLIER('Table'[Product])&&'Table'[TipoDeSolicitud]=EARLIER('Table'[TipoDeSolicitud])),[FechaSolicitud])
return
IF(
'Table'[TipoDeSolicitud]="Alta",_max)
maxdate =
var _maxdate = MAXX(ALL('Table')
,[FechaSolicitud])
return
IF(
'Table'[TipoDeSolicitud]="Baja",_maxdate)
2. Create calculated table.
Table 2 =
SUMMARIZE(
'Table',
'Table'[Product],
"FechaAlta",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxgroup_date]),
"FechaBaja",
MAXX(FILTER(ALL('Table'),[Product]=EARLIER('Table'[Product])),[maxdate])
)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.