Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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] )
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |