Forum Discussion
Calculate median based on dynamic information
Hi walterdp,
I modify the formulas and the current it seems work on your sample pbix file, and it can also be responds with the filter effects. You can try to use the following measure formula if it works on your side:
medida =
VAR summary =
SUMMARIZE (
ALLSELECTED ( 'Calendario' ),
[Date],
"RCount",
CALCULATE (
COUNTA ( 'Despliegues por Día (v)'[Sistema impactado] ),
FILTER (
ALLSELECTED ( 'Despliegues por Día (v)'),
[Fecha Paso a prod real] = [Date]
)
)
)
RETURN
MEDIANX ( summary, [RCount] )
Regards,
Xiaoxin Sheng
Hi Anonymous
Thanks for the reply. I've tried your solution but it did not work as expected. Maybe it is because I'm not understanding how to use it or maybe I'm not clear about what we need.
If it is the first one, I've added your formula to the file and now you can see the results in two different sheets.
In case I did not explain myself, I added an Excel sheet with an example of what I think would be a solution (somehow).
The table at the left shows an extract of what is in the PowerBI data
There, the calculations do not work as the table does not contain the days with 0 deploys.
The second table is a manual creation, based on the first one, including all the days in 2022. THere, the calculations are the ones I need, but adding filters such as application, period of time, etc.
Thanks
W.