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
KarlNixon
Advocate I
Advocate I

Multiple date type columns

Help please - I'm new!

 

I want to write a report that shows for a selected date range (say December) the number of quotations issued and number of quotes won in the month.

 

For example I have the following data set

 

example.JPG

 

Effectively I want to calculate the quoted qty with reference to the [Quote date] and ignore the [Date won or lost] and calculate the Won or Lost quantity by referencing the [Date Won or Lost] but ignore the Quote Date

 

Any assistance would be greatly appreciated.

2 ACCEPTED SOLUTIONS
moumipanja
Microsoft Employee
Microsoft Employee

Does this layout work?

1.JPG

1.To get this one, go to Edit Queries -> Right click on your Table and duplicate it -> Let's name the tables as Table1 and Table2

2. Delete Date Won or Lost and Status columns from Table 1 

1.JPG

3. Delete Quote Date column in Table 2

1.JPG

4. Click on Close&Apply to return to the Report View

5. Create a Date table and establish the connection with Table1 and Table2

Date = CALENDARAUTO()

1.JPG

6. Create 3 measures to calculate Qty Quoted, Qty Won and Qty Lost as below

Qty Quoted = 
SUMX(
	KEEPFILTERS(VALUES('Table1'[Quote Date])),
	CALCULATE(SUM('Table1'[Qty]))
)
Qty Won = 
CALCULATE(SUM('Table2'[Qty]), Table2[Status]="W", KEEPFILTERS(Table2[Date Won or Lost]))
Qty Lost = 
CALCULATE(SUM('Table2'[Qty]), Table2[Status]="L", KEEPFILTERS(Table2[Date Won or Lost]))

7. Display these measures in a Matrix layout as Values and Date column from newly created Date table as Rows with hierarchy as Year and Month

1.JPG

 

 

 

View solution in original post

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @KarlNixon,

 

Please download another solution from the attachment. 

1. Create a date table. 

Calendar = CALENDARAUTO()

2. Establish two relationships while only one is active.

3. Create three measures.

QTY Quoted = sum(Table1[QTY])
QTY Won =
CALCULATE (
    SUM ( Table1[QTY] ),
    USERELATIONSHIP ( 'Calendar'[Date], Table1[Date Won or Lost] ),
    Table1[Status] = "W"
)
QTY Lost =
CALCULATE (
    SUM ( Table1[QTY] ),
    USERELATIONSHIP ( 'Calendar'[Date], Table1[Date Won or Lost] ),
    Table1[Status] = "L"
)

Multiple-date-type-columns

 

 

Best Regards,

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

View solution in original post

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @KarlNixon,

 

Please download another solution from the attachment. 

1. Create a date table. 

Calendar = CALENDARAUTO()

2. Establish two relationships while only one is active.

3. Create three measures.

QTY Quoted = sum(Table1[QTY])
QTY Won =
CALCULATE (
    SUM ( Table1[QTY] ),
    USERELATIONSHIP ( 'Calendar'[Date], Table1[Date Won or Lost] ),
    Table1[Status] = "W"
)
QTY Lost =
CALCULATE (
    SUM ( Table1[QTY] ),
    USERELATIONSHIP ( 'Calendar'[Date], Table1[Date Won or Lost] ),
    Table1[Status] = "L"
)

Multiple-date-type-columns

 

 

Best Regards,

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

Thank you - that is the perfect solution!

 

Much appreciated!!!!

moumipanja
Microsoft Employee
Microsoft Employee

Does this layout work?

1.JPG

1.To get this one, go to Edit Queries -> Right click on your Table and duplicate it -> Let's name the tables as Table1 and Table2

2. Delete Date Won or Lost and Status columns from Table 1 

1.JPG

3. Delete Quote Date column in Table 2

1.JPG

4. Click on Close&Apply to return to the Report View

5. Create a Date table and establish the connection with Table1 and Table2

Date = CALENDARAUTO()

1.JPG

6. Create 3 measures to calculate Qty Quoted, Qty Won and Qty Lost as below

Qty Quoted = 
SUMX(
	KEEPFILTERS(VALUES('Table1'[Quote Date])),
	CALCULATE(SUM('Table1'[Qty]))
)
Qty Won = 
CALCULATE(SUM('Table2'[Qty]), Table2[Status]="W", KEEPFILTERS(Table2[Date Won or Lost]))
Qty Lost = 
CALCULATE(SUM('Table2'[Qty]), Table2[Status]="L", KEEPFILTERS(Table2[Date Won or Lost]))

7. Display these measures in a Matrix layout as Values and Date column from newly created Date table as Rows with hierarchy as Year and Month

1.JPG

 

 

 

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
Top Kudoed Authors