Forum Discussion
Merging Data from two rows to one row in DAX (not M Query)
I am building an accounting dashboard, part of it is a Balance sheet. One of the columns in the Balance sheet. Balance sheet items are called categories. The difference values generated are
- revenue = sum of values in revenue category
- expense = sum of values in the expense category
- profit = a calculated measure showing the profit for the period. (revenue - expense)
- surplus = profit from previous periods (basically retained income) - through in from the source data
In the Retained Income category of Balance sheet, it should suplus from the previous period + profit for the period
when I try to show profit for the period, it shows all the categories of expense and revenue. what i want is that the
modified surplus should show both the values of surplus and profit in the same row. basically adding the values generated from profit to surplus (which already has an amount)
basically changing the row values on the fly. >
2 Replies
- lbendlinSuper User
If you need calculated tables or columns then you can equally do the transform in M. Only measures are something you cannot do in M.
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
- v-angzheng-msftCommunity Support
Hi, sjehanzeb
As a general advise, please, provide:
- Sample (dummy dataset) data as text, use the table tool in the editing bar
- Expected output from sample data
- Explanation in words of how to get from 1. to 2.
No need to show real data, you can always create some short dummy dataset to illustrate your issue so that we may work out with a workaround