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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Melmehal
Frequent Visitor

Find the first log of a specific status

Hi everyone, 

 

Im fairly new to PowerBi. I was hoping someone can help guide me to how I can do the following: 

 

 Problem:

I have a table called "Quote log" this table look like this: 

Capture.PNG

  

 

I have another table called filtered quote that looks fairly similar.

 

Capture.PNG

I am trying to record the first instance of a Quote log with a specific status "7"  and filter that by the date. Problem is a "quote" can go through the status 7 on different dates. But i need to find the first time it went through that specific status "7", not all the ones that followed. the "created at" column gives me the date in which a quotelog was entered into the system. However thats not helpful because it wouldnt show me if any of those "quotes" with a status "7" were the first or if this status "7" is repeated with that same "quote" Basically i need PowerBi to go through the quote log table and on any day i choose to filter (guess i might need a main date table) it would go and look through all the past quotelogs, see if any of today's "quotes" had a prior status "7", if that is true, then discard those and only return the "quotes" that are recorded where "status" = "7" is the first time it recieves that status 

 

In the above tables: 

 

"status" is my status table that has numbers from 1-15 

"quote" is the quoteID 

"id" is the quotelogID 

 

Any guidance is sincerely appreciated! Thanks in advance. 

2 REPLIES 2
v-xicai
Community Support
Community Support

Hi @Melmehal ,

 

you can try to create Column like DAX below.

 

Column1= CALCULATE ( FIRSTNONBLANK (quotelog[quote], 1 ), FILTER ( ALLSELECTED(quotelog), quotelog[status]= "7"&&quotelog[createdAt]= MIN(quotelog[createdAt])))

 

If I misunderstood it, could you please share your sample data or desired output screenshots for further analysis, you can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.

 

Best Regards,

Amy

 

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

 

Anonymous
Not applicable

Hi @Melmehal 

Please give a sample data and expected results.

It will help to understand your challenge and provide the best solution.

Cheers!
A

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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