Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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])
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
89 | |
79 | |
59 | |
47 | |
40 |