We'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
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 39 | |
| 32 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 37 | |
| 36 | |
| 22 |