Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I have list of projects and variuos business units (Cargo, Link, Infra). I need the slicer to be able to filter the projects table based on those column values. Here's what I have now:
For the slicer I created an extra table only with the list of business units and thought will go with a measure like this:
Selected Metric =
SWITCH(
TRUE(),
SELECTEDVALUE('BusinessUnit'[BU]) = "LINK", CALCULATE('Portfolio status', 'Portfolio status'[LINK]="Yes"),
SELECTEDVALUE('BusinessUnit'[BU]) = "CARGO", CALCULATE('Portfolio status', 'Portfolio status'[CARGO]="Yes"),
SELECTEDVALUE('BusinessUnit'[BU]) = "INFRA",CALCULATE('Portfolio status', 'Portfolio status'[INFRA]="Yes"))
But it does not work this way as getting "the expression refers to multiple columns. multiple columns cannot be converted to a scalar value". Could you advise on how I can get the desired result ?
Solved! Go to Solution.
@Anonymous , no measure selected in calculate. Used countrows for example
Selected Metric =
SWITCH(
TRUE(),
SELECTEDVALUE('BusinessUnit'[BU]) = "LINK", CALCULATE(countrows('Portfolio status'), 'Portfolio status'[LINK]="Yes"),
SELECTEDVALUE('BusinessUnit'[BU]) = "CARGO", CALCULATE(countrows('Portfolio status'), 'Portfolio status'[CARGO]="Yes"),
SELECTEDVALUE('BusinessUnit'[BU]) = "INFRA",CALCULATE(countrows('Portfolio status'), 'Portfolio status'[INFRA]="Yes")
)
@Anonymous , no measure selected in calculate. Used countrows for example
Selected Metric =
SWITCH(
TRUE(),
SELECTEDVALUE('BusinessUnit'[BU]) = "LINK", CALCULATE(countrows('Portfolio status'), 'Portfolio status'[LINK]="Yes"),
SELECTEDVALUE('BusinessUnit'[BU]) = "CARGO", CALCULATE(countrows('Portfolio status'), 'Portfolio status'[CARGO]="Yes"),
SELECTEDVALUE('BusinessUnit'[BU]) = "INFRA",CALCULATE(countrows('Portfolio status'), 'Portfolio status'[INFRA]="Yes")
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |