Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hola.
Tengo una tabla con las columnas tipo de producto, monto de la venta y fecha de la venta, la cual debo graficarla como una linea con los montos acumulados por fecha. Este grafico debe poder filtrarse por tipo de producto y rango de fechas calendario, para lo cual genere un tabla de calendario.
Mi problema se presenta en que si uno en el rango de fecha selecciona una fecha inicial y una fecha final, si la fecha inicial no existe en la tabla debe graficarla en el grafico como 0 y mantenerlo hasta llegar al punto del monto de la primera fecha de venta incluida en el rango seleccionado. Por otro lado la fecha final, en caso de no existir, debe graficarse tambien manteniendo el monto acumulado de la ultima venta registrada en el rango de fechas seleccionado.
¿Como puedo hacer para generar este grafico correctamente con los valores 0 cuando no existe venta?
Hi @MauroBote ,
Based on my test, the best way I can think of at the moment is "+0".
You can add "+0" in your measure. For example,
Measure = SUM('Table'[sale amount])+0
Neither April 17 nor May 31 are listed in the Sales Date column of the main table. The disadvantage is that other dates that are not in the sales date column are all 0.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Stephen Tao!
It doesn't work for me because when I add the 0, the graphic show al dates (as amount 0) and not only the selected dates on slicer.
The problem of the 0 between the selected dates on slicer no matter because I'm doing a running total formula for the amounts.
If there is a way to restringe the grapich just for selected dates on slicer, it would be a perfect solution.
Thanks, but it doesn´t work. Actually I have already this formula and doesn't show the initial date on the graphic:
@MauroBote , Check if a measure like this can help
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 38 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 66 | |
| 63 | |
| 34 | |
| 32 | |
| 21 |