Forum Discussion
sum only some row in a column
- 6 years ago
Hi Anonymous
Calculate measures
Measure 2 = VAR disc = CALCULATE ( DISTINCTCOUNT ( 'Table'[VENDACCOUNT] ), ALLEXCEPT ( 'Table', 'Table'[ITEMID] ) ) VAR con = CONCATENATEX ( FILTER ( ALL ( 'Table' ), 'Table'[ITEMID] = MAX ( 'Table'[ITEMID] ) ), [FP fornitore] ) RETURN IF ( disc > 1 && con <> BLANK (), 1 ) Measure = CALCULATE ( SUM ( 'Table'[Valore] ), FILTER ( ALLEXCEPT ( 'Table', 'Table'[ITEMID] ), 'Table'[FP fornitore] = BLANK () && [Measure 2] = 1 ) )Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
Please Watch/Like/Share My webinar on Time Intelligence: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
My Youtube Tips at: https://www.youtube.com/playlist?list=PLPaNVDMhUXGYrm5rm6ME6rjzKGSvT9Jmy
I need to see if we bought the same ITEM from different vendor, so i need to sum the value for each
Cause we can buy item A from vendor X and item A from vendor Y, maybe Y vendor has a better contract ( column "FP Fornitore"), so i need to sum the value that we lost with the other vendor X
While, if we buy item A only from one seller there is no problem!
Hope that's better