Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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...
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.
| User | Count |
|---|---|
| 45 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |