Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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")
)
User | Count |
---|---|
16 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
19 | |
15 | |
14 | |
11 | |
10 |