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.
this is my sample table which i used in power bi. the yellow highlighted column is the one i want to create.
now i am trying to create new calculated column in power bi if the item_code is newSKU or not based on the MonthKey.
For example, in CurrentMonth, item_code '33' is in Jun-23 MonthKey and not present in the last six months so it can say Yes as newSKU
but for item_code '22' it present in both Jun-22 and May-22 that mean it present in both current month and also in the last six months so it is No in newSKU.
any suggestion on how to get that in DAX functions on that? Thanks in advance.
Solved! Go to Solution.
Hi,
Write this calculated column formula
newSKU = if(Data[isCurrentMonth]="Yes",if(CALCULATE(COUNTA(Data[Item_Code]),FILTER(Data,Data[Item_Code]=EARLIER(Data[Item_Code])&&Data[MonthKey]>=EDATE(EARLIER(Data[MonthKey]),-6)))>1,"No","Yes"))
Hope this helps.
Hi,
Write this calculated column formula
newSKU = if(Data[isCurrentMonth]="Yes",if(CALCULATE(COUNTA(Data[Item_Code]),FILTER(Data,Data[Item_Code]=EARLIER(Data[Item_Code])&&Data[MonthKey]>=EDATE(EARLIER(Data[MonthKey]),-6)))>1,"No","Yes"))
Hope this helps.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |