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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ivvan_smo
New Member

Comparison of two data points with different submission date

Dear all, 

I have following dataset:

TitleValueSubmission date
Test 11006/1/2024
Test 22006/1/2024
Test 33006/1/2024
Test 11006/2/2024
Test 23506/2/2024
Test 34006/2/2024
Test 42506/2/2024
Test 22006/3/2024
Test 34006/3/2024
Test 52006/3/2024

 

Ideally I would like to create a comparison in a table showing all the projects available in the data set with corresponding value at last submission date and difference vs. submission chosen in Slicer. For example, If I choose my comparison date to 6/1/2024, the outcome should look like this.

 

TitleLast submissionDiff vs last submission
Test 10-100
Test 22000
Test 3400100
Test 400
Test 5200200

 

Thanks  a lot for your help in advance. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from@ryan_mayu , please allow me to provide another insight:
Hi,@ivvan_smo 

1.First use the calculation table:

 

Table 2 = DISTINCT('Table'[Title])
Table 3 = VALUES('Table'[Submission date])

 

The column in table3 is used as a slicer to prevent the slicer from affecting the measure and calculation column.

 

2.Next create relationships between tables:

vlinyulumsft_0-1719539600665.png

3.Create calculated column references:

 

Last submission = 
VAR cc=CALCULATE(SUM('Table'[Value]),'Table'[Submission date]=MAX('Table'[Submission date]))
RETURN IF(cc=BLANK(),0,cc)
 

 

4. Below are the measure I've created for your needs:

 

Diff vs last submission = 
VAR select111=SELECTEDVALUE('Table 3'[Submission date])
VAR now11=CALCULATE(SUM('Table'[Value]),'Table'[Submission date]=select111)
RETURN MAX('Table 2'[Last submission])-now11

 

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_1-1719539658380.png

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks for the reply from@ryan_mayu , please allow me to provide another insight:
Hi,@ivvan_smo 

1.First use the calculation table:

 

Table 2 = DISTINCT('Table'[Title])
Table 3 = VALUES('Table'[Submission date])

 

The column in table3 is used as a slicer to prevent the slicer from affecting the measure and calculation column.

 

2.Next create relationships between tables:

vlinyulumsft_0-1719539600665.png

3.Create calculated column references:

 

Last submission = 
VAR cc=CALCULATE(SUM('Table'[Value]),'Table'[Submission date]=MAX('Table'[Submission date]))
RETURN IF(cc=BLANK(),0,cc)
 

 

4. Below are the measure I've created for your needs:

 

Diff vs last submission = 
VAR select111=SELECTEDVALUE('Table 3'[Submission date])
VAR now11=CALCULATE(SUM('Table'[Value]),'Table'[Submission date]=select111)
RETURN MAX('Table 2'[Last submission])-now11

 

5.Here's my final result, which I hope meets your requirements.

vlinyulumsft_1-1719539658380.png

 

 

ivvan_smo
New Member

see the screenshot of the data for better understanding of it.

ivvan_smo_0-1719325509069.png

 

@ivvan_smo 

pls see the attachment below

 

11.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors