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
KiranPatil
Frequent Visitor

DAX formula Help

 

IDStatus TimeStageStatus
C1101-04-2018ScreeningPending
C1102-04-2018ScreeningRejected
C1103-04-2018ScreeningPending
C1104-04-2018ScreeningPending

 

Hi Guys ,

 

Need Help on DAX
I have above Transaction , As you can see for Stage "Screening " there are mutiple Status " Pending" for ID "C11".
I need to get Max of Pending Based on Status Time in same table with different column ( like Flag or something ).

Output should be C11 , "04-04-2018","Screening","Pending"
Please help me to retrive this using DAX or any other Method .

Advance Thanks .

2 ACCEPTED SOLUTIONS

Hi @v-jiascu-msft ,

 

Capture11.PNG

 

I have the above transaction and i need to create in calculated column due to obvious reasons . 
For each ID i need Screening Pending MAX Status updated Date .

May be can create one Flag , Please help how to write in the DAX to achieve this .

 

Output should be

A1 Sreening Pending 04-09-18

A2 Sreening Pending 06-09-18

A3 Sreening Pending 08-09-18

A4  Sreening Pending 09-09-18

 

 

Advance thanks 🙂

 

View solution in original post

Hi @KiranPatil,

 

The formula of Flag could be like below. Please check the demo in the attachment.

Flag =
VAR maxDate =
    CALCULATE (
        MAX ( Table1[Status Updated Date] ),
        FILTER (
            'Table1',
            'Table1'[id] = EARLIER ( Table1[id] )
                && Table1[Stage] = "Screening"
                && Table1[Status] = "Pending"
        )
    )
RETURN
    IF ( [Status Updated Date] = maxDate, 1, 0 )

formula_help

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-jiascu-msft
Employee
Employee

Hi @KiranPatil,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-jiascu-msft , Yeah will mark it and thanks for the help .

I have one more doubt . Hope you reply to that as well

v-jiascu-msft
Employee
Employee

Hi @KiranPatil,

 

You can filter the Status and choose the latest Status Time. Please refer to the snapshot below.

DAX_formula_Help

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi ,

 

Need help on this DAX -

 

Interviewed = if('T1"[Stagename]="Screening" && ('T1'[StatusSummary]="Selected" || 'rec_ana trn_Applicant_Trn'[StatusSummary]="Rejected" || 'rec_ana trn_Applicant_Trn'[StatusSummary]="Dropped") && ('rec_ana trn_Applicant_Trn'[Company_code]="C001" || 'rec_ana trn_Applicant_Trn'[Company_code]="C004"),DISTINCTCOUNT('rec_ana trn_Applicant_Trn'[id]))

 

- When i write this DAX formula it is not grouping by ID   . Example - as for 1 particular ID will have 2 Statussummary " Selected and " Rejected " , It is taking count as 2 for that particular ID but i need count as 1 .

Capture.PNG

Example - for the DAX i have written above , iam getting count as 7 but i need count as 4 .

 

For 1st ID it has 2 transaction , Stage="Screening" and Status="Selected " and "Rejected" so it is taking 2 count.

Please help

Hi @KiranPatil,

 

I would suggest you create a measure instead of a calculated column. Can you share a complete sample? Seems there is another table.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-jiascu-msft ,

 

Capture11.PNG

 

I have the above transaction and i need to create in calculated column due to obvious reasons . 
For each ID i need Screening Pending MAX Status updated Date .

May be can create one Flag , Please help how to write in the DAX to achieve this .

 

Output should be

A1 Sreening Pending 04-09-18

A2 Sreening Pending 06-09-18

A3 Sreening Pending 08-09-18

A4  Sreening Pending 09-09-18

 

 

Advance thanks 🙂

 

Hi @KiranPatil,

 

The formula of Flag could be like below. Please check the demo in the attachment.

Flag =
VAR maxDate =
    CALCULATE (
        MAX ( Table1[Status Updated Date] ),
        FILTER (
            'Table1',
            'Table1'[id] = EARLIER ( Table1[id] )
                && Table1[Stage] = "Screening"
                && Table1[Status] = "Pending"
        )
    )
RETURN
    IF ( [Status Updated Date] = maxDate, 1, 0 )

formula_help

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.