Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |