Forum Discussion
Dam
3 years agoNew Member
Problems with accumulative count
Hello,
I've got some problem with this field (accumulative count) :
Z_Cumul_Qtés =
CALCULATE (
COUNT ([DOSSIER]),
FILTER (ALL('DATA'[CI_MOIS]),DATA[CI_MOIS]<= MAX(DATA[CI_MOIS])
)
)
***
CI_MOIS is a numeric format for a month (not date format)
DOSSIER is a reference (text)
CI_ANNEE is a numeric format for a year (not date format)
***
First chart = perfect (with filter CI_ANNEE=2022)
Second chart = perfect (with filter CI_ANNEE=2021)
Third chart = with filter CI_ANNEE 2022 & 2021, and legend CI_ANNEE = how is it possible ?
Dam , if CI_MOIS is in YYYYMM format
Z_Cumul_Qtés =CALCULATE (COUNT ([DOSSIER]),FILTER (ALL('DATA'[CI_MOIS]),DATA[CI_MOIS]<= MAX(DATA[CI_MOIS])))orZ_Cumul_Qtés =CALCULATE (COUNT ([DOSSIER]),FILTER (ALL('DATA'[CI_MOIS]),DATA[CI_MOIS]<= MAX(DATA[CI_MOIS]) && DATA[Year]= MAX(DATA[Year])))If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
2 Replies
- amitchandakSuper User
Dam , if CI_MOIS is in YYYYMM format
Z_Cumul_Qtés =CALCULATE (COUNT ([DOSSIER]),FILTER (ALL('DATA'[CI_MOIS]),DATA[CI_MOIS]<= MAX(DATA[CI_MOIS])))orZ_Cumul_Qtés =CALCULATE (COUNT ([DOSSIER]),FILTER (ALL('DATA'[CI_MOIS]),DATA[CI_MOIS]<= MAX(DATA[CI_MOIS]) && DATA[Year]= MAX(DATA[Year])))If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. - DamNew Member
Thanks Amitchandak,
It was the best solution...