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
KatkaS
Post Patron
Post Patron

First value / approval

Hello,

could anyone help me please with following:

 

I have a table where entities are approving a report. Some entities once (MFR), some several times (PHD).

I need to calculate the FIRST REPORTED TIME (if it was late or on time comparing Update time and App deadline, this I'm able to do:)).

 

Could you please help me how?

Thank you!

 

 

first approval.png

1 ACCEPTED SOLUTION
zaza
Resolver III
Resolver III

Youn need the first reported time:

 

 

First Reported Time = 
    CALCULATE ( 
        MIN ( 'Table'[Update Time] ),
        ALLEXCEPT ( 'Table', 'Table'[Model], 'Table'[Entity], 'Table'[Period] )
    )

 

View solution in original post

14 REPLIES 14
zaza
Resolver III
Resolver III

Youn need the first reported time:

 

 

First Reported Time = 
    CALCULATE ( 
        MIN ( 'Table'[Update Time] ),
        ALLEXCEPT ( 'Table', 'Table'[Model], 'Table'[Entity], 'Table'[Period] )
    )

 

@zaza Thank you!! This is exactly what I needed.. thank you for solving this despite my blurry explanation, but I really did my best:) 

@parry2k , @az38 , @v-yuta-msft Thank you for you time too!!

@zaza that would work but only in case if @KatkaS looking for minimum value across all those 3 columns, but if the requirement is first entry then it will not work, and that was the question I asked. 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

v-yuta-msft
Community Support
Community Support

@KatkaS ,

 


I have a table where entities are approving a report. Some entities once (MFR), some several times (PHD).

I need to calculate the FIRST REPORTED TIME (if it was late or on time comparing Update time and App deadline, this I'm able to do:)).


Could you please clarify more details about this requirement? For example, you can provide sample data using sheet format and give the expected result.

 

Regards,

Jimmy Tao

Thank you for looking into this!

I've attached an excel sheet with an example below.

 

I need to calculate if the entities were On time with their finance reporting:

This calculation is easy and I do it as following: If Update time minus App deadline is higher than zero, then it is On time (I use Custom columns to do it). 

Problem is that entities can report several times, like e.g. Entity F below. And I need to take in cionsideration only first approval...

 

I hope it is clearer now?

Thank you very muhc!

MODELENTITYUPDATE TIMEAPP DEADLINE
FINANCE_INPUTA2020-04-03 20:30:332020-04-03 21:00
FINANCE_INPUTB2020-04-03 19:21:542020-04-03 16:00
FINANCE_INPUTC2020-04-03 19:01:092020-04-03 10:00
FINANCE_INPUTD2020-04-03 18:54:112020-04-03 10:00
FINANCE_INPUTE2020-04-03 17:42:532020-04-03 16:00
FINANCE_INPUTF2020-04-03 16:01:472020-04-03 16:00
FINANCE_INPUTF2020-04-03 15:56:242020-04-03 16:00

 

update 2:

 

Hello,

I should probably also mention that in the file, there are different types of reports (column MODEL) and different periods and I need to calculate if the reporting was on time per Entity, Model and per Period..

 

MODELPERIODENTITYUPDATE TIMEAPP DEADLINE
SalesMarch2020A2020-04-03 20:30:332020-04-03 21:00
SalesMarch2020 B2020-04-03 20:05:042020-04-03 21:00
SalesMarch2020B2020-04-03 22:15:042020-04-03 21:00
SalesFebruary2020B2020-04-03 19:21:542020-04-03 16:00
FINANCE_INPUTMarch2020 C2020-04-03 19:01:092020-04-03 10:00
FINANCE_INPUTMarch2020 D2020-04-03 18:54:112020-04-03 10:00
FINANCE_INPUTMarch2020 E2020-04-03 17:42:532020-04-03 16:00
FINANCE_INPUTMarch2020 F2020-04-03 16:01:472020-04-03 16:00
FINANCE_INPUTMarch2020 F2020-04-03 15:56:242020-04-03 16:00

@KatkaS I guess in case of entity F, you want updated time, minimum time from both the records or you want the first record, if you want updated time from first records, what identifies the first record?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hello Parry,

in case of entity F, I only want first record - first record is the one that comes first timewise - in column UPDATE TIME (in case of entity F first is UPDATE TIME at 15:56:24).

I hope it clearer now.. thank you!

@KatkaS I thought so too and that's why I didn't want to give any solution. So my question was, is there any identifier which record is first, if not then you need to add an index column in power query? Let's start here and then we can get to the solution.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@zaza agreed but not based on the sample data @KatkaS  provided. 😛



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k maybe I'm just too tired, but isn't the first update time the MIN value? ¯\_(ツ)_/¯

 

 

az38
Community Champion
Community Champion

@KatkaS 

based on your example what result do you expect?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 I have to calculate how many reports were reported on time and how many were late (App deadline minus Update time)...

az38
Community Champion
Community Champion

Hi @KatkaS 

it still not completely clear, but you can try s measures like

In Time = CALCULATE(COUNTROWS(Table), Table[Update Time] <= Table[App deadline])

and

Late = CALCULATE(COUNTROWS(Table), Table[Update Time] >= Table[App deadline])

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.