Forum Discussion
ljx0648
3 years agoHelper III
Summing assets based on dates from another table
Hi guys, I have two tables already connected in powerbi (using both "date" column in the table) Last date of previous fiscal refers to the last date of the previous fiscal year (New fis...
- 3 years ago
sevenhills
3 years agoSuper User
You can have a measure as below:
Asset Last Date of previou fiscal =
var _selD = SELECTEDVALUE(SumAssets_AssetTable[Date])
var _val = CALCULATE( Max(SumAssets_CalendarTable[Last Date of Previous Fiscal]), FILTER(SumAssets_CalendarTable, SumAssets_CalendarTable[Date] = _selD))
var _asset = CALCULATE(sum(SumAssets_AssetTable[Current asset]), SumAssets_AssetTable[Date] = _val)
RETURN if ( HASONEVALUE(SumAssets_AssetTable[Date]), _asset)
Say, you have the relationship as below:
Data as
Output will be as
To display exactly your needs, you can filter the visual as
Hope this helps!
- ljx06483 years agoHelper III
Thank you for your quick response! I will try to apply this measure after I have access to my data next week.
Much appreciated!