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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
545
Frequent Visitor

Count Measure with Filter

i have this measure:

# Total_Eng_reports_By_date =
VAR x = CALCULATE(DISTINCTCOUNT(qryAssemblyProcessReport[ItemID]), tblStations[StationCode]=28)
return IF(ISBLANK(x), 0,x)
 
the date is set to 4/3/2024 
 
it checks if the item is in station 28, and if it is so then it counts it as 1.
 
 it counted 5.
545_0-1713169950159.png

 

but there are 16 in power query 

 

 

AssemblyDocNo             ItemID                   itemclass        OrderID                stationcode           employeecode       process date   

545_1-1713170027374.png

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @545,

Perhaps You can add variable table with summarize function to calculate the measure formula on the detail level. Then you can summary it's result based on iterator aggregation functions.

Measure Totals, The Final Word - Microsoft Fabric Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @545,

Perhaps You can add variable table with summarize function to calculate the measure formula on the detail level. Then you can summary it's result based on iterator aggregation functions.

Measure Totals, The Final Word - Microsoft Fabric Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
_AAndrade
Super User
Super User

Hi @545,

Can you provide a sample pbix file with same data so I can take a look?

 





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




545
Frequent Visitor

is there a quick way to do that?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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