Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I'm relatively new to PowerBI and hoping someone can help me with what seems a simple problem - it would take 2 seconds in excel but I'm struggling with DAX to get the 'right' answer in PowerBI.
I have a table called 'Supplier' containing a number of suppliers and unit prices. I'd like to set up a table showing the price difference between supplier 'c' and each of the suppliers.
Name | Price | Variance to C |
a | £1 | -£2 |
b | £2 | -£1 |
c | £3 | £- |
d | £4 | £1 |
e | £5 | £2 |
f | £6 | £3 |
I've written the following measure..
SupplierVar = SUM(supplier[price])-CALCULATE(SUM(supplier[price]),FILTER(supplier,supplier[name]="c"))
The measure above does not give me the desired result.
Any pointers would be appreciated.
Thanks
Solved! Go to Solution.
Hello,
Try this:
SupplierVar = SUM(supplier[price])-CALCULATE(SUM(supplier[price]),supplier[name]="c")
just removed Filter from your function 🙂
Hello,
Try this:
SupplierVar = SUM(supplier[price])-CALCULATE(SUM(supplier[price]),supplier[name]="c")
just removed Filter from your function 🙂
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |