Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.