Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi All,
Please help me the DAX calculated column in the below requirement. I am unable to get exact solution with this requirement it's very urgent. I tried different ways
Requirement:
Below are the sample records and column names uploaded to be work on PBI. Please help
largeProductCode JCUS_Policy JCUS_Customer_Identifier Unconfirmed_Customer_Flag SCID_Policy NewSCV_SCID_POST Status
500 6014232 10000115001 0 63855098 0
500 6014232 10000115001 0 63855098 0
500 6641238 10000204001 0 63712575 0
500 6641238 10000204001 0 63712575 0 Good Case 1
500 4610051 10000204001 0 63693665 1 Good Case 1
500 7131464 10000278001 1 63712225 1
500 7131464 10000280001 1 63712224 1
500 7131464 10000280001 1 63712225 1
500 7144856 10000281001 1 63850097 1
500 7144856 10000281001 0 63850097 1 Bad Case 1
501 9921395 10000022001 0 63945420 1 Bad Case 1
501 9921395 10000022001 0 63945420 1
501 9914410 10000020001 1 63734551 1
501 9914410 10000020001 1 63734551 1
@Vinay07 ,hello @BeaBF thank you for your prompt reply!
For bad case,please try as following:
Column2 =
VAR CurrentRow = 'Table'[SCID_Policy]
VAR PreviousSCID = CALCULATE(
MAX('Table'[SCID_Policy]),
FILTER(
ALL('Table'),
'Table'[JCUS_Customer_Identifier] <> EARLIER('Table'[JCUS_Customer_Identifier]) &&
'Table'[Unconfirmed_Customer_Flag] = EARLIER('Table'[Unconfirmed_Customer_Flag]) &&
'Table'[Unconfirmed_Customer_Flag] =0&&
'Table'[SCID_Policy] <> CurrentRow &&
'Table'[NewSCV_SCID_POST] = EARLIER('Table'[NewSCV_SCID_POST])&&
'Table'[NewSCV_SCID_POST]=1
)
)
var calc =
IF(
'Table'[Unconfirmed_Customer_Flag] = 0 &&
CurrentRow <> BLANK() &&
PreviousSCID <> BLANK() &&
CurrentRow <> PreviousSCID,
"Bad Case 1",
BLANK()
)
return calc
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @BeaBF
Here are the detail explination about assignment in the below screenshot and I have added colors for easy understand.
For Good Case 1 : When two SCID_Policy were assigned to two different NewSCV_SCID_POST (Post_scid 000 & 001) but in JCUS_Customer_Identifier assigned (Unconfirmed flag : 0)
For Bad case 1 : When two SCID_Policy were assigned to one single New SCV_SCID_POST (POST_SCID: 1)while in the two different JCUS_Customer_Identifier assigned (Unconfirmed_Customer_Flag:0)
@Vinay07 ok, on the data you paste, the only labels that you expect as output are those in field status? no more?
BBF
@Vinay07 ok, which is the difference between rows 3 and 4 in your example?
Status
500 6014232 10000115001 0 63855098 0
500 6014232 10000115001 0 63855098 0
500 6641238 10000204001 0 63712575 0
500 6641238 10000204001 0 63712575 0 Good Case 1
500 4610051 10000204001 0 63693665 1 Good Case 1
because i created a formula that returns Good Case 1 in correct way, but also in row 3.
I need to understand the difference.
BBF
Hi @BeaBF
We have to Skip the 3rd record it's duplicate for particular policy. Can you share me the formula. I will test it.
@Vinay07 This is the code only for Good Case 1:
Hi @BeaBF
Thank you so much. I will test and let you know. How about Bad case 1 ? Is same calculation working on Bad case 1 also ?
@Vinay07 The construction is the same, but with different conditions. While you test the Good case, i'll make the Bad case formula.
BBF
Hi @BeaBF
I tested the Dax calculation got the result, could you please share Bad Case 1 calculation also.
@Vinay07 can you please re-explain the difference between Good Case and Bad Case?
and paste the correct sample data on which can I make some tests.
Thx,
BBF
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |