cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
florindaniel96 Frequent Visitor
Frequent Visitor

Show last available value in matrix

Hi everyone,

 

I have created a calculated column that shows me cumulative data from inception up to selected date for a project(so it can grow or be lower based on how the (let's say order value) has changed. My data comes from ORCL database so the full timeline is not displayed as it only shows data if there was a modification in that specific date. What i want to say:

 

Date            Project     Value

FY19-P01         x             xxx

FY19-P05         x             xxx
FY19-P12         x             
(so there might be a gap of some months if there is nothing populated there)

 

What i try to do in my analysis, is compare the cumulative data from FY18-P12 and FY19-P12. But there are cases where, in my table, there is no line with that date from some projects so in my matrix it will show nothing. Is there a way to display the last available cumulative data? 

Using the example above, if there was no change from FY19-P05 up to FY19-P12, just display the data from FY19-P05.

1 ACCEPTED SOLUTION

Accepted Solutions
florindaniel96 Frequent Visitor
Frequent Visitor

Re: Show last available value in matrix

How i worked this out: In Power Query, created a table with distinct project numbers and joined it with distinct financial dates column so the result would be a combination of every single project with every single financial date. This is more of a workaround as it creates a table with a lot of rows (of course depending on the size of the initial data [for it was from 50k rows to 940k]), but this is how i solved it.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Show last available value in matrix

Hi @florindaniel96 

You could

1. Find out what the previous date is

2. Calculate the value for the current en previous date

3. If they're the same, return that value, otherwise return value for current date

I can't be more specific without more details, especially the code you use for the calculated column ( and  a sample of your data tables)

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

florindaniel96 Frequent Visitor
Frequent Visitor

Re: Show last available value in matrix

METRIC_CUMULATIVE = Var Currentdata=TABLE[CALENDARISTIC_DATE]
Return
if(COUNTROWS(TABLE)>0,
CALCULATE(SUM(TABLE[METRIC]),
FILTER(ALLEXCEPT(TABLE,TABLE[PROJECT]),TABLE[CALENDARISTIC_DATE]<=Currentdata)), BLANK())
 
this is how i calculate the cumulative column. Unfortunately the data is really sensitive.
Community Support Team
Community Support Team

Re: Show last available value in matrix

 Hi @florindaniel96 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
florindaniel96 Frequent Visitor
Frequent Visitor

Re: Show last available value in matrix

How i worked this out: In Power Query, created a table with distinct project numbers and joined it with distinct financial dates column so the result would be a combination of every single project with every single financial date. This is more of a workaround as it creates a table with a lot of rows (of course depending on the size of the initial data [for it was from 50k rows to 940k]), but this is how i solved it.

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 65 members 1,258 guests
Please welcome our newest community members: