Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
70 | |
64 | |
51 | |
39 | |
26 |
User | Count |
---|---|
86 | |
55 | |
44 | |
42 | |
36 |