Forum Discussion
Compare Data - Different Tables & multiple Rows
i try this formula but it doesn't work. and i can't even figure out how to find previous order data
Freight Total = SUM(BK_FRT[RATE])
Last Order = Sumx(filter(allselected(BK_HEADER), [BK_CUSTOMER] = max([BK_CUSTOMER]) && [BK_CRT_DATE] = max([BK_CRT_DATE])),[Freight Total])
really need your help Greg_Deckler amitchandak Anonymous
Hi Anonymous,
If you want to compare current value and previous value, your table requires regular numeric/date value fields then you can use this field as index to looping records and get the corresponding previous values.
If not, you can try to enter to query editor and group with current table category fields and add index inside the groups, then you can get a valid index field for dax format calculations.
Numbering Grouped Data in Power Query
Regards,
Xiaoxin Sheng
- Anonymous5 years agoNot applicable
Hi @v-shex-msft,
Indexing is done as you suggested. Unique ID for each order. Still i can't create a formula to bring last order & previous order for each customer 😕
- Anonymous5 years agoNot applicable
HI Anonymous,
Can you please share a pbix file with some dummy data to test? I test with your sample data but they can't link bk_numbers with customers correctly. BTW, you snapshot also not help to clarify the table relationships.
How to Get Your Question Answered Quickly
Notice: please not attach the sensitive data in the sample file.
Regards,
Xiaoxin Sheng