Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am new using power BI, I have learned some formulas in DAX, however I have some doubts about when to use ALL when using the FILTER function. In the image below I show a part of the model that I developed, there are 3 tables: the Requirements table (RQPax), states (EstPrin) and Dates.
What I want to obtain is the accumulated requirements with status "Planned" by date.The requirements with status "Planned" have planning dates of 01/27, 01/28, 01/31, 02/01, 02/02. On 01/29 and 01/30 there are no planned requirements. I initially developed this formula:
AcumPaxPlanifV2 = CALCULATE(COUNTA(RQPax[CÓDIGO DE CUPO]),FILTER(EstPrin, EstPrin[Estados Principales]="Planificado"),FILTER(ALL(Fechas), Fechas[Fecha] <= MAX(Fechas[Fecha])))+0The result obtained was not as desired as seen in the image:
As soon as I add the ALL function in the EstPrin table I get the desired result:
AcumPaxPlanifV2 = CALCULATE(COUNTA(RQPax[CÓDIGO DE CUPO]),FILTER(ALL(EstPrin), EstPrin[Estados Principales]="Planificado"),FILTER(ALL(Fechas), Fechas[Fecha] <= MAX(Fechas[Fecha])))+0I know it has to be related to the planning dates, but could someone explain the logic to me, thanks for the help !!
Regards
Anthony
Solved! Go to Solution.
@apcor . without all on EstPrin, it was filtering the date also which could have appeared because of the next filter.
check if this gives the same result as the second formula
AcumPaxPlanifV2 = CALCULATE(COUNTA(RQPax[CÓDIGO DE CUPO]), EstPrin[Estados Principales]="Planificado",FILTER(ALL(Fechas), Fechas[Fecha] <= MAX(Fechas[Fecha])))+0
@apcor . without all on EstPrin, it was filtering the date also which could have appeared because of the next filter.
check if this gives the same result as the second formula
AcumPaxPlanifV2 = CALCULATE(COUNTA(RQPax[CÓDIGO DE CUPO]), EstPrin[Estados Principales]="Planificado",FILTER(ALL(Fechas), Fechas[Fecha] <= MAX(Fechas[Fecha])))+0
Thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |