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
Anonymous
Not applicable

displaying count of sales by two different dates

I've a table sales like

 

idcustomer      year of birth amountsalesdatenext processingdatenew processingdate
12197012012/03/202215/04/202217/03/2022
13197514013/03/202218/04/202223/03/2022
14198016014/03/202221/04/202229/03/2022
15198518015/03/202224/04/202204/04/2022

 

there are 2 columns New_processing_date and next_processing_date that I need a timeline how many of sales that it is each day 

Something like this but I dont think I got it right, how to correct it please?

image (2).png

1 ACCEPTED SOLUTION
AilleryO
Memorable Member
Memorable Member

Hi,

 

My advice would be to use a date table (easy and quick to build, like this) and make a relationship with your Sales date. Then make a second relation from New Processing date and your date table.

This 2nd relationship will be inactive (dashed line), but to use that relation use the function USERELATIONSHIP.

I don't know your structure but it will be something like this :

To SUM using the sales date and building your table with date coming from date table :

SUM( [Salesamount] )

or for SUM using the NewProcessingDate :

CALCULATESUM( [Salesamount] ) , USERELATIONSHIP[NewProcessingDate] DateTable[Date] ) )
Both calculations in a visual using date from date table should give you expected results.
Let us know

 

View solution in original post

1 REPLY 1
AilleryO
Memorable Member
Memorable Member

Hi,

 

My advice would be to use a date table (easy and quick to build, like this) and make a relationship with your Sales date. Then make a second relation from New Processing date and your date table.

This 2nd relationship will be inactive (dashed line), but to use that relation use the function USERELATIONSHIP.

I don't know your structure but it will be something like this :

To SUM using the sales date and building your table with date coming from date table :

SUM( [Salesamount] )

or for SUM using the NewProcessingDate :

CALCULATESUM( [Salesamount] ) , USERELATIONSHIP[NewProcessingDate] DateTable[Date] ) )
Both calculations in a visual using date from date table should give you expected results.
Let us know

 

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!

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.