Forum Discussion
Interaction between several measures filter context
Hello,
I am trying to built a dynamic kaplan meier indicateur without create a physical table as it was done here https://community.powerbi.com/t5/Desktop/Kaplan-Meier-Survival-Curves/m-p/330081
To do that, I split each step of calculation and plot them into power visual frame, here below :
All the columns are calculatued measures except "IndiceTemps" that is a column from the original table.
Almost all the measures calculated returned me the result I expected except the measure "SumLnKaplanMeier".
I have just tried to calculate a running sum of LnKaplanMeier, but something is going wrong.
The values I expected to have for that measure in this views are successively : -0.03 ; -0.07 ; -0.11 ; -0.17 ; -0.23 ...
Here the formula for each one:
Hi Anonymous
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
2 Replies
- MFelixSuper User
Hi Anonymous
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message. - MFelixSuper User
Hi Anonymous ,
Has you referred this is a question about context, since you are not making the selection of the energie and energie type on your calculation the context get's missed and the sum is made for all IndiceTemps.
1_SumLnKaplanMeier = SUMX ( FILTER ( SUMMARIZE ( ALLSELECTED ( reporting_courbe_de_survie_contrat_test ), reporting_courbe_de_survie_contrat_test[1_IndiceTemps], reporting_courbe_de_survie_contrat_test[energie], reporting_courbe_de_survie_contrat_test[type_energie], "@KaplanMeier", [1_LnKaplanMeier] ), reporting_courbe_de_survie_contrat_test[1_IndiceTemps] <= MAX ( reporting_courbe_de_survie_contrat_test[1_IndiceTemps] ) && reporting_courbe_de_survie_contrat_test[energie] = MAX ( reporting_courbe_de_survie_contrat_test[energie] ) && reporting_courbe_de_survie_contrat_test[type_energie] = MAX ( reporting_courbe_de_survie_contrat_test[type_energie] ) ), [@KaplanMeier] )