Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Team,
I want your help in writing a dax query. My requirement is given below -
My data
| segement | sales | manufacturer |
| midsize uv | 100 | A |
| midsize uv | 200 | B |
| premium full size | 400 | B |
expected sum 300 since ONLY midsize uv is the part of A |
I want to find out the sum of sales for all those segments where manufacturer is equals to A e.g midsize UV is the part of A manufacturer so total sum of sales would be 100 +200 = 300. premium full size is not part of A so it is ignored
Solved! Go to Solution.
@SagarJagga ,Please try this formula
Proud to be a Super User! |
|
@SagarJagga ,Please try this formula
Proud to be a Super User! |
|
Hi Gautam,
Getting an error "A table of multiple values was supplied where a single value was expected"
@SagarJagga , You can create a measure for this
SumOfSalesForA =
CALCULATE (
SUM ( YourTable[sales] ),
FILTER (
YourTable,
YourTable[segment] IN {
SELECTCOLUMNS (
FILTER (
YourTable,
YourTable[manufacturer] = "A"
),
"segment", YourTable[segment]
)
}
)
)
Proud to be a Super User! |
|
Thanks for your help, just wanted to know why selectColumn has not worked.
Much appreciated
Hi Gautam,
Actually we have multiple segments which are coming under manufacturer A. so it is throwing an error "A table of multiple values was supplied where a single value was expected"
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 21 | |
| 10 | |
| 8 | |
| 8 |