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 September 15. Request your voucher.
Hi Everyone,
I hope to find you all well, I have the following table:
Part Number | Last Price | Standard Price | Volume | Balance |
Part 1 | 10 | 9 | 10 | -10 |
Part 2 | 11 | 13 | 15 | 30 |
Part 3 | 12 | 10 | 8 | -16 |
Totals | 33 | 32 | 33 | X |
If I leave the measurement be, the balance will do the totals calculation:
(32-33) * 33 = -33
Which is not correct. So, last time, the problem was that the balance was not calculating correctly, I did some digging and found the solution was to add a SUMX expression to a different calculation, somthing like this:
Final Measure = SUMX(Table, Original Measure)
I feel I have to give full context so that we are all on the same page, the exercise I'm doing is the calculation of the cost of materials in my plant, so we have last prices every month, I made a calculation so that whenever you chose a date it will always give you the last price. So now we basically have all the pieces of the puzzle, I just need one more things.
I need the final results on a Matrix Table, something like this
Category | Jan | Feb | Mar | ... |
Impact | Final Result January | Final Result February | Final Result March | Final Result for the Remaining Months |
Does anyone know how to do this?
Thank you. Best Regards
Solved! Go to Solution.
Hi @JorgeCervantes ,
As far as I know, if the [Month] column is related to your data table, the balance measure should work. You can also try SUMX() function.
Balance = SUMX('Table',('Table'[Standard Price] - 'Table'[Last Price]) * 'Table'[Volume])
My Sample:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JorgeCervantes ,
As far as I know, if the [Month] column is related to your data table, the balance measure should work. You can also try SUMX() function.
Balance = SUMX('Table',('Table'[Standard Price] - 'Table'[Last Price]) * 'Table'[Volume])
My Sample:
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
59 | |
55 | |
53 | |
49 | |
30 |
User | Count |
---|---|
177 | |
88 | |
70 | |
48 | |
48 |