cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
uie07923
Frequent Visitor

Challenge: Find out new records from last update

Hi Colleagues!

 

I have a report that is downloaded in every working day.

It brings a list of materials and records of alerts (like risks of shortages, MRP exceptions).

The question asked every day is: "what are the items that had new messages or increases from the last update to today?"

uie07923_0-1622461282427.png

What we do is a pivot table and manually identify these (as per example above).

How can I make this identification in Power BI?

1 ACCEPTED SOLUTION
AlB
Super User
Super User

@uie07923 

Try this measure:

Measure =
VAR currentDate_ =
    SELECTEDVALUE ( Table1[Data Report] )
VAR prevDate_ =
    CALCULATE ( MAX ( Table1[Data Report] ), Table1[Data Report] < currentDate_ )
VAR currentVal_ =
    COUNT ( Table1[Data Report] )
VAR prevVal_ =
    CALCULATE ( COUNT ( Table1[Data Report] ), Table1[Data Report] = prevDate_ )
VAR diff_ = currenVal_ - prevVal_
RETURN
    IF ( diff_ > 0, diff_ )

   

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

3 REPLIES 3
AlB
Super User
Super User

@uie07923 

Try this measure:

Measure =
VAR currentDate_ =
    SELECTEDVALUE ( Table1[Data Report] )
VAR prevDate_ =
    CALCULATE ( MAX ( Table1[Data Report] ), Table1[Data Report] < currentDate_ )
VAR currentVal_ =
    COUNT ( Table1[Data Report] )
VAR prevVal_ =
    CALCULATE ( COUNT ( Table1[Data Report] ), Table1[Data Report] = prevDate_ )
VAR diff_ = currenVal_ - prevVal_
RETURN
    IF ( diff_ > 0, diff_ )

   

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

View solution in original post

uie07923
Frequent Visitor

Something like this:

 

uie07923_0-1622469063128.png

The pivot table is just a Count of lines:

 

uie07923_1-1622469111281.png

 

AlB
Super User
Super User

Hi @uie07923 

Can you show a sample of the underlying table that you use for the pivot? and an example of the calculation based on that data?

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors