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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Kacper3
New Member

Data from previous years not appearing when filtering

My issue is the data is inaccurate when I filter by date.

Context

The report shows:

  • The total won projects (This is based on dealstage = "Closed - Won")

  • Total quotes submitted (I'm using the original quote date to stamp that the project has been through the quote stage. The projects move out of the quote stage and update, so using "Dealstage" will be inaccurate)

  • Then I'm dividing both to get a conversion rate.

I've tried using the original quote date for filtering but there's project's quoted in 2023 that aren't appearing in the won projects measure.

When I filter by close date, it only shows me a total of projects that have a close date and original quote date, either won or lost. 

 

My goal is to display a conversion rate and total projects won each year while displaying projects we've won even if they've been quoted in 2023. 

 

Here's my measures:

06 - Total Win = 

CALCULATE(COUNTROWS('result_deals'),
'result_deals'[dealstage] = "Closed - Won"
)


03 - ConversionRate = 
DIVIDE(
[06 - Total Win], [20 - Total_QS]
) 20 - Total_QS = CALCULATE(     COUNTROWS('result_deals'),     NOT(ISBLANK('result_deals'[original_quote_date])) || result_deals[dealstage] = "Quote Submitted" )

What can I do differently?

 

Thanks

1 ACCEPTED SOLUTION
Kacper3
New Member

I managed to solve the issue. 

I create a new column that will chose the relevant date. If the project has been closed - won, it will take the date from closedate column otherwise use original_quote_date. 

Relevant_Date = 
IF('result_deals'[dealstage] = "Closed - Won",
    'result_deals'[closedate],
    'result_deals'[original_quote_date]
)


I'm using the above column for filtering and using the relevant date column as the date slicer. 

View solution in original post

5 REPLIES 5
Kacper3
New Member

I managed to solve the issue. 

I create a new column that will chose the relevant date. If the project has been closed - won, it will take the date from closedate column otherwise use original_quote_date. 

Relevant_Date = 
IF('result_deals'[dealstage] = "Closed - Won",
    'result_deals'[closedate],
    'result_deals'[original_quote_date]
)


I'm using the above column for filtering and using the relevant date column as the date slicer. 

Kacper3
New Member

@Sahir_Maharaj @danextian @Ashish_Mathur 

I've tried both solutions but they still don't seem to work. 

I've tried creating a centralized date table and making the active relationship to original quote date but it's still not working. 

Due to data privacy and working with real information, below is sample of my data (it's not allowing me upload a CSV file) 

 

I have highlighted project 12 an example. 

 

The goal is to create a conversion rate of quotes submitted to projects won. Then, in a line graph display and card visual show the total projects won and projects quoted. Finally, use a date slicer to narrow down and see the total project won and quoted in a set period (Year, QTR, and Month) 

 

ProjectNamedeal_currency_codecreatedateCountryCO#closed_lost_reasonclosedatedealstagedel_startorder_dueoriginal_quote_dateSum of unit_amount
project 2EUR16/04/2024 12:51IRE29373323412 14/11/2024 15:15Closed - Won01/04/2025 00:0001/01/2025 00:0007/05/2024 00:0065
project 3EUR27/09/2024 09:52IRE29382040502 29/11/2024 12:33Closed - Won03/03/2025 00:0004/11/2024 00:0018/10/2024 00:00461
project 4EUR17/06/2024 12:58IRE29385007545 29/11/2024 15:06Closed - Won01/05/2025 00:0001/11/2024 00:0009/07/2024 00:00146
project 5GBP29/01/2024 09:12UK29343585074Project Cancelled12/12/2024 12:01Closed - Lost 19/02/2024 00:00271
project 6GBP04/03/2024 09:01UK29363593221Project Went Traditional12/12/2024 15:26Closed - Lost 25/03/2024 00:00111
project 7EUR03/12/2024 15:53IRE29794206393  Waiting Response 23/02/2023 00:00154
project 8GBP01/02/2023 12:26UK29355474285  Quote Submitted 23/02/2023 00:00272
project 9GBP03/02/2023 12:05UK29700203912  Quote Submitted 24/02/2023 00:00645
project 10EUR04/02/2023 12:55IRE29377504819  Quote Submitted 25/02/2023 00:00164
project 11GBP08/01/2024 14:56UK30231210568Competitors01/02/2024 14:56Closed - Lost 25/01/2024 00:00333
project 12EUR20/11/2023 16:11IRE30362596895 28/02/2024 16:14Closed - Won03/06/2024 00:00 11/12/2023 00:00689
project 13EUR08/04/2024 10:41IRE29762598472Project Went Traditional30/04/2024 15:03Closed - Lost02/09/2024 00:00 29/04/2024 00:00538
project 14EUR01/02/2024 10:47IRE29675180097 31/05/2024 12:29Closed - Won02/09/2024 00:00 22/02/2024 00:00107
project 15EUR22/08/2024 12:45IRE29679128651 15/06/2024 12:26Closed - Won03/06/2024 00:00 12/09/2024 00:00213
project 16GBP09/04/2024 10:47UK29674186626 01/07/2024 12:18Closed - Won03/03/2025 00:00 30/04/2024 00:00207
project 17EUR14/05/2024 10:36IRE29675181415 25/09/2024 15:14Closed - Won01/05/2025 00:00 04/06/2024 00:00183
project 18EUR09/05/2024 12:45IRE29679125549 08/10/2024 15:16Closed - Won01/10/2024 00:00 30/05/2024 00:00173
danextian
Super User
Super User

Hi @Kacper3 

While measures can contain aggregates outside the selected range, the way filters from a related or the same table work is that it shows only the rows based on what's been selected such that if you select 2024, it will show just all 2024rows. You can either change the numeric slicer to before and reference the max year in your measure or use a disconnected table to show even those that are not from the current year using still by referencing it in a measure.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Sahir_Maharaj
Super User
Super User

Hello @Kacper3,

 

Can you please try this:

06 - Total Win = 
CALCULATE(
    COUNTROWS('result_deals'),
    'result_deals'[dealstage] = "Closed - Won"
)

20 - Total_QS = 
CALCULATE(
    COUNTROWS('result_deals'),
    OR(
        NOT(ISBLANK('result_deals'[original_quote_date])),
        'result_deals'[dealstage] = "Quote Submitted"
    )
)

03 - ConversionRate = 
DIVIDE(
    CALCULATE(
        [06 - Total Win],
        'result_deals'[CloseYear] = SELECTEDVALUE('Calendar'[Year])
    ),
    CALCULATE(
        [20 - Total_QS],
        'result_deals'[QuoteYear] = SELECTEDVALUE('Calendar'[Year])
    )
)

QuoteYear = YEAR('result_deals'[original_quote_date])

CloseYear = YEAR('result_deals'[close_date])

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.