Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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])
)
User | Count |
---|---|
122 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
183 | |
92 | |
67 | |
62 | |
52 |