Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.