Forum Discussion
Adding a sum to a table from list
- 4 years ago
Hi,
Total calculation logic uses the same dax as within the columns/rows it is trying to calculate total. However in the total calculation filter context e.g. using SELECTEDVALUE() return blanks. To combat this you can change the calculation logic of the measure for total values e.g. IF(SELECTEDVALUE('Table'[month])=blank(),[total calculation logic],[original calculation logic])
Thanks for your answer. Can you give me an example? I´m new on Power Bi and can´t follow you 100%
Okay,
So for the steps:
Unpivot:
Select a column in powerquery and "unpivot other columns" or in this case select month column January, February....
You get a table like this:
Dimension tables:
So with this I mean tables that act as a slicer in between your two tables e.g. Calendar with Month column or a list of all the positions. Alternatively you can ignore this step and modify the measures for incoming and outgoing.
As an example here 'IncomingFact' table is a table that I unpivoted and 'Incoming' Table is the "list" table:
'Incoming'
'IncomingFact'
End result:
For outgoing I reversed the "<" condition
This should be a more detailed explanation. Ping me with @ if you still have questions.