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.
Hello.
Let's say I am connecting to a DirectQuery dataset, and it has a measure called "Total Sales". Can I create my own measure, and use the existing "Total Sales" measure, but using Calculate() and add additional filter, for example colour="red"?
Example below:
CALCULATE(
[Total Sales], // this is from a DirectQuery connection
Table[Colour] = "Green" // this is what I want to add
)
Does anyone know if this should work? I tried doing this, but my numbers doesn't change at all even after adding that colour filter.
Solved! Go to Solution.
pls try this
CALCULATE(
[Total Sales],
FILTER(ALL('Table',Table[Colour] = "Green")
)
Thank you @Ahmedx . Apparently yours, and even the one in my example, works. It's just that the visual doesn't refresh properly after I changed the visual, so it looked like it didn't work, when in fact it did.
pls try this
CALCULATE(
[Total Sales],
FILTER(ALL('Table',Table[Colour] = "Green")
)
Thank you @Ahmedx . Apparently yours, and even the one in my example, works. It's just that the visual doesn't refresh properly after I changed the visual, so it looked like it didn't work, when in fact it did.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
User | Count |
---|---|
85 | |
82 | |
66 | |
52 | |
48 |
User | Count |
---|---|
100 | |
49 | |
42 | |
39 | |
38 |