Forum Discussion
Filter A Second Column by Filter Context
Dear Eric,
thanks so much for helping.
I tried to understand the formula (for hours :smileyhappy:) but still I have some problems understanding:
CALUCATE SUM - understand
FILTER - understand
NOT CONTAINS - understand
CALCULATETABLE - Only the companies within the external filter context?
LASTNONBLANK - Don't understand
The sum seems to be ok, but I can not use it in a table, as the sceenshots shows.
Thanks again
Frank
Dear Eric,
I think I found a solution when learning more about Dax by reading "The Definitive Guide to Dax". Here I learned about the funktion USERELATIONSSHIP.
I created a new table "Companies" for the definition of the companies. Then I linked that table to the fact table twice. First with the Company ID and second with the Partner Company ID. The I use the first connection to sum the sales and the second connection with the USERELATIONSHIP function to sum the partner sales. Then I calculate sum of sales minus partner sales = correct sales.
It seems to work correctly (and faster). And I understand it :smileylol:
I'll test it with my real case. If I still have problems, I'll write again.
Best
Frank
- kamiscfr9 years agoRegular Visitor
...no.
PartnerSales subtracts All parter sales but only partner sales within the filter context are allowed to be subtracted. I need both conditions simultaneously. :smileyfrustrated: