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
Hi, i want to create a formula that calculates the sales amount in ARS$ or in USD based on what I've selected in a filter.
But I'm not very good with calculate yet.
I have a sales table connected with a calendar table and a dolar price table connected 1 to 1 with the calendar table (because i have only one dollar price per day); this tables has 3 columns (fecha, precio_compra, precio_venta)
so i was working with this formula
Hi @ezepbi
Try with this
Total_Ventas_Seleccionado =
SWITCH(
SELECTEDVALUE('Seleccion Moneda'[Moneda]),
"Dólares", SUMX(ventas_detalle,ventas_detalle[Venta] * RELATED(cotizacion_dolar_blue[precio_venta]),
"ARS$", SUM(ventas_detalle[Venta])
)
Let me know if it works.
You did it you genius!
well almost, here's what i did
Hi @ezepbi ,
Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!
Best Regards
Yilong Zhou
Hi @ezepbi
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
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 |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 70 | |
| 39 | |
| 35 | |
| 23 |