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
Buenos dias, estoy tratando de realizar el siguiente calculo en DAX pero me estoy encontrando con un problema.
Tengo una tabla de ventas que se llama VENTAS_FACT
Lo que yo quiero mostrar la suma de clientes (distinct) por año en cada linea
Este seria el ejemplo de lo que necesito
Ahora, cuando utilizo la formula siguiente logicamente me trae la suma de todos los clientes de la tabla sin importar el filtro año:
Solved! Go to Solution.
@Anonymous , In the date table you should have a new column for month, year etc.
Also when mark that as date table you will not get hierarchy
calculate(countrows(values(VENTAS_FACT[CODIGO_CLIENTE])), all(DM_FECHA[Mes]))
example
Addcolumns(calendar(date(2020,01,01), date(2021,12,31) ), "Month no" , month([date])
, "Year", year([date])
, "Month Year", format([date],"mmm-yyyy")
, "Month year sort", year([date])*100 + month([date])
, "Month",FORMAT([Date],"mmmm")
, "Month sort", month([DAte])
)
@Anonymous , In the date table you should have a new column for month, year etc.
Also when mark that as date table you will not get hierarchy
calculate(countrows(values(VENTAS_FACT[CODIGO_CLIENTE])), all(DM_FECHA[Mes]))
example
Addcolumns(calendar(date(2020,01,01), date(2021,12,31) ), "Month no" , month([date])
, "Year", year([date])
, "Month Year", format([date],"mmm-yyyy")
, "Month year sort", year([date])*100 + month([date])
, "Month",FORMAT([Date],"mmmm")
, "Month sort", month([DAte])
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.