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,
I'm totally new to PowerBI and dax and I'm using the Contoso sample file.
From the following grid, I'd like to add a new measure that would Sum SalesAmount for each Store (StoreName and SalesAmount are coming from 2 different - but linked - tables):
Goal is to get the contribution of each ProductCategory to StoreTotal.
Any advise would be warly welcome!
Thanks,
Oliver
Hi @OliverS, just to confirm, is SalesAmount a measure or column? And you want to show the full sales amount for the store on each row? If I understand you correctly, here's how I would approach this:
Sales = SUM ( SalesTable[SalesAmount] )
Store Sales =
IF (
HASONEVALUE ( StoreTable[StoreName] ),
CALCULATE ( Sales, ALL ( [ProductCategory] ) )
)
Hi Jared,
Yes, SalesAmount is a column.
When trying this approach, the validation error message is "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value."
Still puzzled to see how such an important feature in a BI report is hard to do.
Thanks for your help!
Olivier
Hi @OliverS,
Have you resolve your issue? If you have resolved it, please mark the helpful reply as answer, if you haven't, please feel free to ask.
Best Regards,
Angelia
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 |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |