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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ALVIV99
New Member

CANCEL SALES

Hey, I'm very new in Power Bi and I have an issue.

 

I need to create a measure of Cancel Sales, the problem is that I have only one column of Sales that in there includes the Sales and Cancel Sales and also two Dates (FECHA_DOC) and (FECHA_ CANCELA) 

FECHA_DOC = When the sale was made

FECHA_CANCELA = If the customer didn't want to buy 

 

I want to take the Cancel Sales with FECHA_CANCELA

I use this formula

 

TOT SALES = SUM(FACTURAS[TOTAL SALES]) "The column with the sales and cancel sales"

 

CANCEL SALES = CALCULATE([TOT SALES]), DATEADD(FACTURAS[FECHA_CANCELA],0,MONTH))
 
But it doesn't take the date of FECHA_CANCELA instead it takes FECHA_DOC.
 
If someone can help me, I would appreciate it very much.
 
1 ACCEPTED SOLUTION
ALVIV99
New Member

I found the answer while searching the internet, I use USERELATIONSHIP

 

1) I took my Column (FECHA_CANCELA) and connected with my Calendar Table(CALENDARIO[DATE]),we can see that when these two tables are connected, it will not be a primary connection but a secondary one, since a dotted line will be seen.

 

2) Now I use this new Meassure

CANCEL SALES = CALCULATE( [TOT SALES] , USERELATIONSHIP(CALENDARIO[Date],FACTURAS[FECHA_CANCELA]))
 
Now I can see my CANCEL SALES
All in a NEW MEASURE not in a column

 

View solution in original post

2 REPLIES 2
ALVIV99
New Member

I found the answer while searching the internet, I use USERELATIONSHIP

 

1) I took my Column (FECHA_CANCELA) and connected with my Calendar Table(CALENDARIO[DATE]),we can see that when these two tables are connected, it will not be a primary connection but a secondary one, since a dotted line will be seen.

 

2) Now I use this new Meassure

CANCEL SALES = CALCULATE( [TOT SALES] , USERELATIONSHIP(CALENDARIO[Date],FACTURAS[FECHA_CANCELA]))
 
Now I can see my CANCEL SALES
All in a NEW MEASURE not in a column

 

Anonymous
Not applicable

Hi @ALVIV99 ,

 

Now that you have found a solution, please mark your own reply as the answer, and more people will benefit from it.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.