Forum Discussion
Total error when Retrieve the last available value from a table.
Dears,
This is a link for the Power BI file of the below-demonstrated Case:
https://www.dropbox.com/scl/fi/8d5sz6w4ksjhr6z9312dr/Use-Case.pbix?rlkey=nytwo1qj4w3tylaatarttqog6&dl=0
I have a table called "BRU_Facility_Limit" that has a value for each GL_ID in different Company_Code. as per the below screenshot.
I created a report page containing the following:
Year slicer that comes from the DATES table
Month Number slicer that comes from the DATES table
both of these slices filter a table Matrix that has in Rows a Company_Code column from the "COMPANYCODE" table & GL_ID from the "GL_Accounts" table to allow drill down from company code to its GL IDs.
I created a measure that retrieves the last available value of the GL in the "BRU_Facility_Limit" table because the values in this table are not continuous for each month. so if the user chooses Year: 2023 & Month:1 and there are no values for the GL; the measure will return the values of the last available month before the selected Year & Month. To do so I make the relationship between the DATES dimension table and the BRU_Facility_Limit table "inactive"
The problem is that the Total rows don't sum the total values of the retrieved rows in the visual, it shows the value of the last retrieved available row. the same when I drill up to the Company Code level it doesn't show the Sum of the retrieved GLs but represents the last value of the last retrieved GL.
this is the measure I used:
24 Replies
- some_bihCommunity Champion
Hi Ezzeldin
if you want to retriev LASTDATE, try to rework your measure as on link for column "Last date Sales" in example I created.
https://dax.do/0qEUdVul7CvnFj/