cancel
Showing results 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.

New Member

## Comparing Values with Previous not based on Dates

Hi,

Relative noobie here.  I have checked many existing posts and videos but I am not getting how to approach the problem.

And this is what I would like to see in a Matrix or Table:

I realize I need to do something at the Query level (new column or some DAX expression) but I don't understand how I can add a column to my Holdings table that says something like:

And then calculating the Chg would be easy enough (Calculated column).

1 ACCEPTED SOLUTION
Super User

Previous period value.pbix

 Expertise = List.Accumulate(        {Days as from Today},        {Skills and Knowledge},        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday))

5 REPLIES 5
Super User

Previous period value.pbix

 Expertise = List.Accumulate(        {Days as from Today},        {Skills and Knowledge},        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday))

New Member

Even though all solutions posted work, I like this one because I don't have to create the Load table and entries - even though I didn't ask for this.

Thanks all for helping me out.

Super User

``````Total = SUM(HOLDINGS[value])
Super User

Hi @dbiduk ,

With the given data, create two calculated columns

``````Previous Load by holding =
CALCULATE (
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Holding] ),
)
)
``````
``````Previous value by holding =
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Holding] ),
)
)
``````

Use the second column to create a % change measure.

Note: the look you want  for your matrix is not currently achievable out of the box ( will require advanced DAX)

Please see attached pbix for reference.

Proud to be a Super User!

"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
New Member

Actually, this one doesn't need the LOAD table either.  I kinda prefer this one becuase it adds the new data as calculated columns, not measures.  But, again, I am new so what do I know :-).

Thanks!!

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors