Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I have a table like:
Product, Client, Price, Profit, Units, etc
I want to calculate some sums eg:
1) sum of units per product
2) sum of units per client
3) sum of profits per client
etc
How can I calculate these and then how can I put them in a graph like:
1) x axis = product, y axis = sum of units per product
2) x axis = client, y axis = sum of profits per client
Thanks!
Solved! Go to Solution.
HI @UsePowerBI,
You can try to use the following measure formulas if they meet your requirement:
Measure 1 =
CALCULATE (
SUM ( Table[Unit] ),
ALLSELECTED ( Table ),
VALUES ( Table[Product] )
)
Measure 2 =
CALCULATE (
SUM ( Table[Unit] ),
ALLSELECTED ( Table ),
VALUES ( Table[Client] )
)
Measure 3 =
CALCULATE (
SUM ( Table[Profit] ),
ALLSELECTED ( Table ),
VALUES ( Table[Client] )
)
If above not help, please hare some dummy data to test:
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
HI @UsePowerBI,
You can try to use the following measure formulas if they meet your requirement:
Measure 1 =
CALCULATE (
SUM ( Table[Unit] ),
ALLSELECTED ( Table ),
VALUES ( Table[Product] )
)
Measure 2 =
CALCULATE (
SUM ( Table[Unit] ),
ALLSELECTED ( Table ),
VALUES ( Table[Client] )
)
Measure 3 =
CALCULATE (
SUM ( Table[Profit] ),
ALLSELECTED ( Table ),
VALUES ( Table[Client] )
)
If above not help, please hare some dummy data to test:
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@UsePowerBI ,
Create different measures like:
sum of units per product = CALCULATE(SUM(Table[Unit]),ALLEXCEPT(Table,Table[Product]))
sum of units per client = CALCULATE(SUM(Table[Unit]),ALLEXCEPT(Table,Table[Client]))
sum of profits per client = CALCULATE(SUM(Table[Profit]),ALLEXCEPT(Table,Table[Client]))
And put them in charts.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |