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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
PBI-DEV
Regular Visitor

New measure, Table or Query... Whatever will give these results in power bi.....

foreach part number which has a field associated as IsInStock and it's  > 0 then return 1 for only one of them and 0 for the rest... i.e. I need to treat each part number as distinct and if any of the underlying records IsInStock > 0, then I need to add just one for that part number on that particular date

 

PBIDEV_0-1624520756752.png

 

The problem is, the Total IsInStock should be less than the skuCount

 

It works fine if a date and location are selected like this....

 

PBIDEV_1-1624517264990.png

So the previous pictures IsInStock should be something less than 75,511 for D and 13,439 for A... most likely approx. 75-90%

Any help with a calculation of measure is greatly appreciated....

 

P.S. It's OK if I have to get rid of some filters for the view I need....

Just need a view that will give correct numbers.... Thanks in advance ‌ 🤔

1 ACCEPTED SOLUTION
PBI-DEV
Regular Visitor

 

PBIDEV_1-1624693069131.png

 

Well it seems this is the only solution I was able to come up with using a table

and SQL Data....

 

Thanks to anyone who was able to at least view this... 🙂

View solution in original post

2 REPLIES 2
PBI-DEV
Regular Visitor

 

PBIDEV_1-1624693069131.png

 

Well it seems this is the only solution I was able to come up with using a table

and SQL Data....

 

Thanks to anyone who was able to at least view this... 🙂

Anonymous
Not applicable

@PBI-DEV 

Thank you for sharing.😁

 

 

Paul Zheng _ Community Support Team

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.