cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hitesh1607
Helper I
Helper I

Status change count and inidicator

Hi - I have a table like below:

 

Invoice idSnapshot DateStatus
Abc12May 1Closed
Abc12April 1Active

 

I need

1) to get a column that helps me indicate which status is changed by invoiced Id and Snapshot date

2) Count of total status change

 

Thank you

Hitesh

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@hitesh1607 , You can add a new column like

new column =
var _max = maxx(filter(Table, [Invoice id] =earlier([Invoice id]) && [Snapshot Date] <earlier([Snapshot Date])),[Snapshot Date])
return
if([Status] <> maxx(filter(Table, [Invoice id] =earlier([Invoice id]) && [Snapshot Date] = _max),[Snapshot Date]) ,1,0)

 

and then use that as filter



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User IV
Super User IV

@hitesh1607 , You can add a new column like

new column =
var _max = maxx(filter(Table, [Invoice id] =earlier([Invoice id]) && [Snapshot Date] <earlier([Snapshot Date])),[Snapshot Date])
return
if([Status] <> maxx(filter(Table, [Invoice id] =earlier([Invoice id]) && [Snapshot Date] = _max),[Snapshot Date]) ,1,0)

 

and then use that as filter



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

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

Top Solution Authors
Top Kudoed Authors