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

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

Reply
Anonymous
Not applicable

Need help with DAX-Command

Hi Community,

 

We have two different columns. One column for articles, one column for stocks.
The column article contains multiple entries for every week.

We need a DAX-formula with output of the first week, where the stock is under zero, or, when there is no negative stock , the count of 99.

 

I would appreciate your help.

 

.2763ffa1-68cb-48d7-8dbf-67db0a844a4d.jpg7a771744-46bd-4274-b8c4-70d2e313e0a1.jpg

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous 

You can refer to the following example

Creata a new column

Ausgabe = var _filter=MINX(FILTER('Table',[Atrikle]=EARLIER([Atrikle])&&[Bestand]<0),[Kalenderwhche])
return IF(_filter<>0,_filter,99)

vxinruzhumsft_0-1675232563867.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

tamerj1
Super User
Super User

Hi @Anonymous 

please try

New Column =
MINX (
FILTER (
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Article] ) ),
'Table'[Stock] < 0
),
'Table'[Week]
)

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.