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.
Hi all,
I have a filter of 1 sale name (example: sale person Sara).
This sale person - Sara have revenue in 3 products: A, B, D. (our list of products have many products as A, B, C, D, E, F...)
I want to calculate total revenue of 3 products: A, B, D (of all sale persons).
So it means that if I change my filter to another sale person, the measure will sum of total revenue of all sale persons but only for the products that belongs to filtered sale person.
Please help to advise me on this case.
Thank you!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below, and I hope the below can provide some ideas on how to create a solution for your datamodel.
Revenue expected measure: =
VAR _productlist =
SUMMARIZE (
FILTER (
ADDCOLUMNS ( ALL ( 'Product'[Product] ), "@rev", [Revenue total:] ),
[@rev] <> BLANK ()
),
'Product'[Product]
)
RETURN
CALCULATE (
[Revenue total:],
ALL ( Person[Sales person] ),
KEEPFILTERS ( 'Product'[Product] IN _productlist )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @li_pham
Thanks for reaching out to us.
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
For fun only, a showcase of powerful Excel worksheet formulas
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi,
Please check the below picture and the attached pbix file.
I tried to create a sample pbix file like below, and I hope the below can provide some ideas on how to create a solution for your datamodel.
Revenue expected measure: =
VAR _productlist =
SUMMARIZE (
FILTER (
ADDCOLUMNS ( ALL ( 'Product'[Product] ), "@rev", [Revenue total:] ),
[@rev] <> BLANK ()
),
'Product'[Product]
)
RETURN
CALCULATE (
[Revenue total:],
ALL ( Person[Sales person] ),
KEEPFILTERS ( 'Product'[Product] IN _productlist )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |