Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello All,
Pleaseeee!!! I need help from the gurus in Power BI community.
I am trying to show only the last stage in a table visual and not the other previous stages.
I have tried to use Max date and lastnonblank but it's not workin. Attched is a screen shot of the table and the last activity I would like to get is marker in red 8-Final Mech.
Thanks!!
Solved! Go to Solution.
Hi @Anonymous ,
Dont know whether the number at the left-most in ranking in order,if so,take below steps:
1.create a column as below:
_number = LEFT('Table'[Stage],1)
2.create a measure as below:
Last activity =
var _maxnumber=MAXX(FILTER(ALL('Table'),'Table'[Date] in FILTERS('calendar table'[Date])),'Table'[_number])
Return
CALCULATE(MAX('Table'[Stage]),FILTER('Table','Table'[Date] in FILTERS('calendar table'[Date])&&'Table'[_number]=_maxnumber&&'Table'[Stage]<>BLANK()))
And you will see:
If the number order is disordered,then first create an index column;
Then create a measure as below:
Last activity =
var _maxnumber=MAXX(FILTER(ALL('Table'),'Table'[Date] in FILTERS('calendar table'[Date])),'Table'[_number])
Return
CALCULATE(MAX('Table'[Stage]),FILTER('Table','Table'[Date] in FILTERS('calendar table'[Date])&&'Table'[_number]=_maxnumber&&'Table'[Stage]<>BLANK()))
And you will see:
For the related .pbix file ,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi, @Anonymous
Please correct me if I wrongly understood your question.
I am not sure how to suggest without seeing your DAX measure, but please try to write something like below.
measures = calculate ( max(your measure to find the stage), allselected (your table[House Number]))
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thanks Jihwan,
this is the measure I tried
2.LAST ACTIVITY =
VAR SELECTEDDATE=MAX('CONSTRUCTION SCHEDULE'[FINISH DATE])
VAR CURRENTSTATUS =MAX('CONSTRUCTION SCHEDULE'[CURRENT STAGE])
RETURN
IF(CURRENTSTATUS == BLANK() || CURRENTSTATUS = "",
VAR LATESTSTATUSDATE =
CALCULATE(
MAX('CONSTRUCTION SCHEDULE'[FINISH DATE]),
'CONSTRUCTION SCHEDULE'[FINISH DATE]<SELECTEDDATE,
'CONSTRUCTION SCHEDULE'[CURRENT STAGE]<> BLANK()
)
RETURN
CALCULATE(
MAX('CONSTRUCTION SCHEDULE'[STAGES]),
'CONSTRUCTION SCHEDULE'[FINISH DATE]=CURRENTSTATUS
),
CURRENTSTATUS
)
This is what it is giving me when I filter (9-Lock Out) which is totally wrong
instead of showing the last stages dynamically for each house number please see attachement
This is the correct one below it should show 8-Final Mech when filtered and when unfiltered by house number it should last stage for all house number.
I appreciate you taking time out to help me!
The above is what it is showing which is wrong
Hi @Anonymous ,
Dont know whether the number at the left-most in ranking in order,if so,take below steps:
1.create a column as below:
_number = LEFT('Table'[Stage],1)
2.create a measure as below:
Last activity =
var _maxnumber=MAXX(FILTER(ALL('Table'),'Table'[Date] in FILTERS('calendar table'[Date])),'Table'[_number])
Return
CALCULATE(MAX('Table'[Stage]),FILTER('Table','Table'[Date] in FILTERS('calendar table'[Date])&&'Table'[_number]=_maxnumber&&'Table'[Stage]<>BLANK()))
And you will see:
If the number order is disordered,then first create an index column;
Then create a measure as below:
Last activity =
var _maxnumber=MAXX(FILTER(ALL('Table'),'Table'[Date] in FILTERS('calendar table'[Date])),'Table'[_number])
Return
CALCULATE(MAX('Table'[Stage]),FILTER('Table','Table'[Date] in FILTERS('calendar table'[Date])&&'Table'[_number]=_maxnumber&&'Table'[Stage]<>BLANK()))
And you will see:
For the related .pbix file ,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Awesome! Kelly thanks for your help appreciate it !!
User | Count |
---|---|
117 | |
74 | |
59 | |
51 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |