Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have regular monthly data like sales, number of licenses, and other account related information that I would like to relate against the attributes of accounts that change over time. That is, I have a table sales activity for accounts and I also have a table of accounts and their attributes. These attributes can change over time (month to month for example), so I would like to be able to relate the invoicing to the attributes that were in effect at that time, not just the most recent set of attributes I have.
If I have a table that has the sales in it like this:
Date | Acct ID | Sales
5-Dec-2017 | 123456 | $10,000.00
8-Jan-2018 | 123456 | $10,500.00
12-Feb-2018 | 123456 | $10,750.00
and another table that includes Acct Attributes that can change each month like this:
Acct Date | Acct ID | Locations | Licenses | Segment
31-Dec-2017 | 123456 | 4 | 22 | Green
31-Jan-2017 | 123456 | 4 | 28 | Green
28-Feb-2017 | 123456 | 5 | 31 | Gold
I'd like to be able to build report that would be able to show something like:
Sales by Segment for Dec through Feb:
Segment | Sales
Green | $20,500
Gold | $10,750
To date, I have been indexing the attributes I want to report by into each row of activity data before I bring it into my BI data and I have to believe there is a better way to do this. I'd love some suggestions!
Solved! Go to Solution.
You may refer to the following DAX that adds a calculated column.
Column = MAXX ( TOPN ( 1, FILTER ( Table2, Table2[Acct ID] = Table1[Acct ID] && Table2[Acct Date] > Table1[Date] ), Table2[Acct Date], ASC ), Table2[Segment] )
You may refer to the following DAX that adds a calculated column.
Column = MAXX ( TOPN ( 1, FILTER ( Table2, Table2[Acct ID] = Table1[Acct ID] && Table2[Acct Date] > Table1[Date] ), Table2[Acct Date], ASC ), Table2[Segment] )
User | Count |
---|---|
65 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |