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
Hitofrancis
New Member

Flag Column creation for KPI calculation based on duplicate values

Hello there,

 I’m a new user on Power BI, but so excited about it. Even though I'm still getting familiar with DAX (A beginner).

 

I would like to achieve the following KPI calculation.

 Capture1.JPG

 

 

 

Above, data that really get close to my entire data base. The idea here is to create those columns on yellow; the first one, a flag column that help me out to count how many Back Order I have during a specific period of time; and the second, a column that helps identify which of my orders were actually a back ordered.

 

Once those columns are created, the idea is to report those BO like this: 

 

Capture2.JPG

Do not know if helps or not, but please realise that the report is based on Reporting Date not in Receipt Date.

 

 

 

 

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Hitofrancis,

 

You may refer to the following DAX first.

Column =
IF (
    COUNTROWS ( CALCULATETABLE ( Table1, ALL ( Table1[Receipt Date] ) ) ) = 1,
    0,
    1
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your reply.

 

Sadly the formula didnt work for me for now, it created a calculate column with a value of 1 in every row. 

 

The results I want to get its 1 = Unique combination of Order # & Order Line & Receipt date; and a 0 when there is Order  &Order Line & with two or more Receipt date.

 

Thank you,



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.