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.
Hey Guys,
I'm looking to do an inner join on a uniqueID from one table to another and then take the sum of a dollar amount from the other table. I want to write this as a DAX measure.
So I have 4 Tables right now like this:
What I want to do is a running inner join on the "ID" on TableA and TableB and sum the "Spent" on TableB , where the running total is 3 months ahead (eg. Jan 2018 sum would be Jan 2018, Feb 2018, Mar 2018, and Apr 2018). So if I plot a a table it would look like this:
I already have a function to do a normal rolling sum, like this:
Roll3Sum = CALCULATE ( SUM ( TableB[Spent] ), FILTER ( ALL ( 'Date' ), 'Date'[Rank] >= MAX ( 'Date'[Rank] ) && 'Date'[Rank] <= MAX ( 'Date'[Rank] ) + 3 ) )
I wanto to perform this but inner join on ID's on the specified month and roll it 3 months ahead like mentioned above.
*EDIT*
here is some sample data, you will see that in the FinalOutput tab, the TotalSpent column is an inner join on the ID'S from tab A and tab B with a 4 month roll including the selected month and the sum of the Spent column from tab B.
Here is the dropbox link:
https://www.dropbox.com/s/mvjzeodkvv5flwi/TestExample.xlsx?dl=0
Solved! Go to Solution.
Hi,
You are welcome. You may download my PBI file from here.
Hope this helps.
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 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |