The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
.
Hi @EnTurk
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)
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.
Hi @EnTurk
please try
New Column =
MINX (
FILTER (
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Article] ) ),
'Table'[Stock] < 0
),
'Table'[Week]
)
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
8 | |
7 |