The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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