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
LouisB
Frequent Visitor

Compare 2 values that are 1 week separated

Hello guys,

 

I was looking at a method to compare 2 values (of the column Total) separated by 1 Week.

The data are the number of Stars of different Apps. I just want to have the number of new stars by week and by app.

 

For example:

 Hive: on the 24/09/2018, I want a new column with the value:  8 (=7264 - 7256)

 

Thank you for your help !

 

Here it is my table:

 

Date Brand 1Star 2Star 3Star 4Star 5Star Total Objective Average

24/09/2018Hive246980683010722087726442,931442731
24/09/2018Legrand Thermostat2003111644,3125
24/09/2018Qivivo Thermostat362122341212542,72
24/09/2018Somfy65249214827544,349090909
24/09/2018Netatmo Energy48725136319356832986844,456627483
24/09/2018Ween1004131844,555555556
24/09/2018tado°99851215466514217603133044,516948612
17/09/2018Somfy65219014626844,361940299
17/09/2018Qivivo Thermostat352122341212442,733870968
17/09/2018Netatmo Energy48625236519226765979044,453319714
17/09/2018Hive246780482810702087725642,931918412
17/09/2018Ween1004131844,555555556
17/09/2018tado°98450615416433215113097544,516739306
17/09/2018Legrand Thermostat1003111544,533333333
10/09/2018Hive246179782410672083723242,932798673
10/09/2018Legrand Thermostat1003111544,533333333
10/09/2018Ween1004131844,555555556
10/09/2018Qivivo Thermostat352122341212442,733870968
10/09/2018Somfy65198914126044,361538462
10/09/2018Netatmo Energy48425236219026721972144,452936941
10/09/2018tado°96750015266378212503062144,51673688
          
1 ACCEPTED SOLUTION
ofirk
Resolver II
Resolver II

Hi,

I think this column would work (replace Table1 with your table name...):

 

column = [Total] - SUMX(FILTER(Table1, [Brand] = EARLIER([Brand]) && (EARLIER([Date]) - [Date])= 7), [Total])

View solution in original post

2 REPLIES 2
ofirk
Resolver II
Resolver II

Hi,

I think this column would work (replace Table1 with your table name...):

 

column = [Total] - SUMX(FILTER(Table1, [Brand] = EARLIER([Brand]) && (EARLIER([Date]) - [Date])= 7), [Total])
LouisB
Frequent Visitor

You are awesome @ofirk !

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.