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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Si_7777
Advocate I
Advocate I

DAX help - counting single item lines

I have  measure to count PO's with single items

 

It kinda works but doesnt sum per day / week / per year

 

Si_7777_1-1754643738607.png

 

My measure is ; 

1 Items per PO =
    CALCULATE(COUNTROWS(Sage_POPOrderReturnLine)
    , FILTER(Sage_POPOrderReturnLine, DISTINCTCOUNT(Sage_POPOrderReturnLine[ItemCode]) = 1))
 
I have tried summerize but I am not getting the syntax correct.

 

 

1 REPLY 1
v-hashadapu
Community Support
Community Support

Hi @Si_7777 , Thank you for reaching out to the Microsoft Community Forum.

 

We took sample data based on your scenario and recreated your matrix structure with Year -> Date -> PO Number. We rewrote the 1 Items per PO measure to first identify POs that have exactly one distinct item, then count them in the current filter context. This ensures the count is accurate at PO, daily and yearly levels without double-counting.

 

Please check the attached .pbix file for your reference and share your thoughts.

 

Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.