The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm trying to get a sum of my sales figures by the product category from the a column in the same table
The original data is below.
Location id | Product type | Sales |
224 | Boots | £42 |
746 | Hat | £74 |
845 | Jumper | £26 |
942 | Hat | £12 |
224 | Boots | £14 |
224 | Jumper | £28 |
746 | Boots | £61 |
And what I'm trying to get is below, I am having trouble getting the right numbers for the last three columns
Location id | Total Sales | Boots Sales | Hat sales | Jumper Sales |
224 | £84 | £56 | £0 | £28 |
746 | £135 | £61 | £74 | £0 |
845 | £26 | £0 | £0 | £26 |
942 | £12 | £0 | £12 | £0 |
I have tried the following code:
Boots_Sales = CALCULATE( SUM(Sheet1[Sales]), FILTER(Sheet1,Sheet1[Product_Type]="Boots"))
Thanks
Solved! Go to Solution.
thank @themistoklisfor the reply i needed in a column to do more working out from that column. I have now found a solution by using the same formula as a above bt for a measure instead of a column.
Thanks
thank @themistoklisfor the reply i needed in a column to do more working out from that column. I have now found a solution by using the same formula as a above bt for a measure instead of a column.
Thanks