Forum Discussion
Logic / Dax require
Thank You for your reply and time share on my query.
| Customer Name | LoB | Type | comments |
| Piramal Ind | Health | Primary | |
| Piramal Ind | Health | Excess | Copy this row and paste in different table and should get delete from this current tabel |
| Nike | Sports | Excess | |
| Tata | Transport | Primary | |
| Tata | Food | Excess | Copy this row and paste in different table and should get delete from this current tabel |
| Tata | Food | Primary | |
| Piramal Ind | Food | Excess | |
| SkyBag | Lifestyle | Primary | |
| SkyBag | Lifestyle | Excess | Copy this row and paste in different table and should get delete from this current tabel |
| SkyBag | Entertainment | NLP | |
| SkyBag | Entertainment | Excess |
Output will look like..
Current table-
| Customer Name | LoB | Type |
| Piramal Ind | Health | Primary |
| Nike | Sports | Excess |
| Tata | Transport | Primary |
| Tata | Food | Primary |
| Piramal Ind | Food | Excess |
| SkyBag | Lifestyle | Primary |
| SkyBag | Entertainment | NLP |
| SkyBag | Entertainment | Excess |
and another table wil add those deleted rows
| Customer Name | LoB | Type |
| Piramal Ind | Health | Excess |
| Tata | Food | Excess |
| SkyBag | Lifestyle | Excess |
Hi PowerBIBeginer ,
I made simple samples and you can check the results below:
Measure = var _t = ADDCOLUMNS('Table',"Same",COUNTAX(FILTER(ALL('Table'),[Type]<>"NLP"&&[Customer Name]=EARLIER([Customer Name])&&[LoB]=EARLIER([LoB])),[Type]))
var _t2 = IF(MAX('Table'[Type])="Excess",1,0)
RETURN IF(MAXX(_t,[Same])<>1&&_t2=1,1,0)
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- PowerBIBeginer2 years agoHelper V
Thank You so much! Very exceited looking at your reply and highly appriciate your time and responce. I highly appriciate You and all the Fabric Community. Sir, I will check this solution and will revert you.
- PowerBIBeginer2 years agoHelper V
Hi, one query please.. How do I add this dax in "Transform Data - applied steps"? I'm basically working there on eliminating steps. Do I need to create this in "Advance editor" under the steps the advaance editor? Pls suggest
- lbendlin2 years agoSuper User
You don't. DAX code is used in the User interface phase. Transform steps are written in Power Query, in the data acquisition and transformation stage. Those are separate processes.
- PowerBIBeginer2 years agoHelper V
Hi, the post where you share screenshot in that we can clearly see that separation happen correctly. But it dosent work on my table..😔 the logic which I said, if same account and LOB and contains Primary and Excess types, then remove excess to the other table, that is not happening.
- Anonymous2 years agoNot applicable
Hi PowerBIBeginer ,
So what results are you getting now and are there any other relationships, please provide more information.
Best regards,
Community Support Team_ Scott Chang