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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rifdhyh
Regular Visitor

Getting Values by MAXIMUM Alphabatic Letter for Distinct Records

Hi All,
Good day..!
May I ask how can I get the values for "For Resubmit" Column by below conditions

My Data Table as below

rifdhyh_4-1656566024402.png

 

 


1. Consider only Latest Revision (Lastest Alphbatical Letter) for each RFA No.
2. If Engineer Response of those records are "Data Incomplete" or "Rejected" then need to count as 1 in "For Resubmit" Column

As per above table I can get values for these records only>

rifdhyh_5-1656566053074.png

 

Noted:
I have used below DAX Function to get Maximum Revision number
= UNICHAR(MAXX(DISTINCT('RFA'[Rfa No]),MAX(UNICODE('RFA'[Revision])))
I need to find how can I apply Specific Values in "Engineer response" column to find "Resubmit" Values

Thanks in Advance

Rifdhy

 

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @rifdhyh 
Her eis the sample file with the solution https://we.tl/t-83VSAA2vug

1.png

For Resubmit = 
VAR CurrentRevision =
    RFA[Revision]
VAR CurrentResponse =
    RFA[Engineers Response]
VAR CurrentRFATable = 
    CALCULATETABLE ( RFA, ALLEXCEPT ( RFA, RFA[RFA No] ) )
VAR LatestRevision =
    MAXX ( CurrentRFATable, RFA[Revision] )
RETURN
    IF ( 
        CurrentRevision = LatestRevision 
            && CurrentResponse IN { "Data Incomplete, please resubmit", "Rejected" },
        1
    )

View solution in original post

4 REPLIES 4
rifdhyh
Regular Visitor

Dear @tamerj1 ,
This DAX Worked properly..
Thanks a lot for you kind response
May Allah bless you...!

tamerj1
Super User
Super User

Hi @rifdhyh 
Her eis the sample file with the solution https://we.tl/t-83VSAA2vug

1.png

For Resubmit = 
VAR CurrentRevision =
    RFA[Revision]
VAR CurrentResponse =
    RFA[Engineers Response]
VAR CurrentRFATable = 
    CALCULATETABLE ( RFA, ALLEXCEPT ( RFA, RFA[RFA No] ) )
VAR LatestRevision =
    MAXX ( CurrentRFATable, RFA[Revision] )
RETURN
    IF ( 
        CurrentRevision = LatestRevision 
            && CurrentResponse IN { "Data Incomplete, please resubmit", "Rejected" },
        1
    )
rifdhyh
Regular Visitor

Hi dear ,
Thanks for your comment,
Simply I need to get
Sum for  "For Resubmit" column,
by fiter latest revision for each RFAs if only Engineer Response is "Data Incomplete" or "Reject"

In above table ony RFA No. "

BIA-RFA-AW-TSC-MT-21-0271

gives latest revision (A) as requested , so only for this RFA should count 1

I need the DAX code for this, Hope you undestood

Thanks a lot for your reply,

Rifdhy

tamerj1
Super User
Super User

@rifdhyh 

I don't fully understand the rest of the conditions (I believe you can handle this part) however, for the last revision you can use

Maximum Revision number =
MAXX (
    CALCULATETABLE ( 'RFA', ALLEXCEPT ( 'RFA', 'RFA'[Rfa No] ) ),
    'RFA'[Revision]
)

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.