Forum Discussion
axel_BI
Helper I
6 years agoRelate Sattelite Sales to Shop
Hi everyone, again im looking for your help. Situation: There are shops, which generate Sales each day. Also there are sattelites, which generate sales each day. The difference is, that the satt...
- 6 years ago
Kind of solved myself:
I created a new column, in which the relevant ID is shown. Either the ShopID or the SatteliteID, depending if there is an entry in the link-table, and if the sales-date is in the corresponding time intervall.New ID = Var _Old ID = Sales[POS] Var _Date = Sales[DATE] Return IF(NOT(ISBLANK(CALCULATE(COUNTROWS(LinkTable), Filter( Filter( Filter( LinkTable, LinkTable[End].[Date]>_Date), LinkTable[Begin].[Date]<=_Date ), LinkTable[Pos]= _OldID) ))), LOOKUPVALUE(LinkTable[Sattelite],LinkTable[POS],_OldID),_OldID)
Then i an create my sum of sales on this new column.
axel_BI
Helper I
6 years agoKind of solved myself:
I created a new column, in which the relevant ID is shown. Either the ShopID or the SatteliteID, depending if there is an entry in the link-table, and if the sales-date is in the corresponding time intervall.
New ID =
Var _Old ID = Sales[POS]
Var _Date = Sales[DATE]
Return
IF(NOT(ISBLANK(CALCULATE(COUNTROWS(LinkTable),
Filter(
Filter(
Filter( LinkTable, LinkTable[End].[Date]>_Date),
LinkTable[Begin].[Date]<=_Date ),
LinkTable[Pos]= _OldID)
))),
LOOKUPVALUE(LinkTable[Sattelite],LinkTable[POS],_OldID),_OldID)
Then i an create my sum of sales on this new column.