cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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

v-diye-msft
Community Support
Community Support

 Hi @Anonymous 

 

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.
AlB
Super User
Super User

Hi @Anonymous 

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

Anonymous
Not applicable

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.