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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Jorrafer25
Frequent Visitor

Criteria to bring info based on dates

Hello Community!

I have a problem in keeping the historical data in my company since we receive the demand for our products from the date we receive it onwards. For example:

Jorrafer25_0-1667391433832.png

The data comes in a table like this:

Jorrafer25_1-1667391537029.png

My goal is to get something like this:

Jorrafer25_2-1667391618412.png

Where you can see that we always keep the last version, but since in the last version we don't have data from 4/1/2022 and backwards, we bring the data from version 2. In version 2 we have the demand from 4/1/2022 onwards, so to have data in the dates 1/1/2022, 2/1/2022 and 3/1/2022, we have to bring the demand from version 1.

 

Thanks in advance

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Jorrafer25 

Using Power Query you can easily create a [Version Number] Column. The use

NewMeasure =
SUMX ( TOPN ( 1, 'Table', 'Table'[Version Number] ), 'Table'[Value] )

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Jorrafer25 

Using Power Query you can easily create a [Version Number] Column. The use

NewMeasure =
SUMX ( TOPN ( 1, 'Table', 'Table'[Version Number] ), 'Table'[Value] )

Helpful resources

Announcements
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.

Top Solution Authors