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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.