Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
I have a report in Power bi where I show information from different countries, when I select a city it shows me the information from only that country, but I want it to make a sum of the information from the last quarter when no city is selected.
But I already have a dax function and I would just like to add that parameter
INDU_INVENTARIO =
/*Variables para seleccionar el idiona*/
VAR Seleccion = SELECTEDVALUE(IDIOMAS[Idioma])
/*Variables para encontrar el ultimo registro en base a la columna de fecha y el valor buscado */
var _lastDateMetro = MAXX(FILTER(Industrial_Latam,NOT(ISBLANK(Industrial_Latam[Inventario Industrial (m²)]))),Industrial_Latam[Fecha])
var _lastDateSQF = MAXX(FILTER(Industrial_Latam,NOT(ISBLANK(Industrial_Latam[Inventario Industrial (sqf)]))),Industrial_Latam[Fecha])
/*Varibles donde se guarda el ultimo valor ecncontrado*/
var Metro = MAXX(FILTER(Industrial_Latam,Industrial_Latam[Fecha]=_lastDateMetro),Industrial_Latam[Inventario Industrial (m²)])
var SQF = MAXX(FILTER(Industrial_Latam,Industrial_Latam[Fecha]=_lastDateMetro),Industrial_Latam[Inventario Industrial (sqf)])
Var SUM_INV = MAXX(FILTER(Industrial_Latam,Industrial_Latam[Fecha]=_lastDateMetro),SUM(Industrial_Latam[Inventario Industrial (sqf)]))
Var Formato =
SWITCH (
TRUE,
Seleccion = "ESP", Metro,
Seleccion = "ENG", SQF,
SUM_INV
)
return Formato
How could I add that parameter while respecting the other conditions?
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 39 | |
| 29 | |
| 24 |