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 would like to get the following output from in my PowerBI Visualization. The below representation is a matrix in my PowerBI Report. The Value column is a measure. The Measure column is the output I'd like to get.
Essentially, what I'm looking to do is for every customer number, assign the value of Sale Type B to all rows for that Customer Number. Any help would be very much appreciated!
Solved! Go to Solution.
Please try this:-
Measure =
CALCULATE(
[Value],
FILTER(
ALL('Table (3)'),
'Table'[Customer Number] = SELECTEDVALUE('Table'[Customer Number])
&& 'Table'[Sales Type] = "B"
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @pbixnewbie ,
You could use the following code:-
Measure =
CALCULATE(
MAX('Table'[Value]),
FILTER(
ALL('Table'),
'Table'[Customer Number] = SELECTEDVALUE('Table'[Customer Number])
&& 'Table'[Sales Type] = "B"
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Thanks Samarth! I tried this, but the 'Value' field in my table is a Measure itself. Hence, the MAX function doesn't accept it as a parameter. Any suggestions?
Please try this:-
Measure =
CALCULATE(
[Value],
FILTER(
ALL('Table (3)'),
'Table'[Customer Number] = SELECTEDVALUE('Table'[Customer Number])
&& 'Table'[Sales Type] = "B"
)
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
User | Count |
---|---|
85 | |
79 | |
64 | |
52 | |
46 |
User | Count |
---|---|
101 | |
44 | |
41 | |
39 | |
37 |