The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
in this problem I need a needed column if seq no is 0 then add a previous value of needed with the value of quantity.. I hope you can understand my problem... If you can't please see the picture there is Excel formula to got understand the problem... Please help me to find out the solution...
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
needed CC =
VAR _serialno = Data[serial no]
VAR _lastnonzeroseqnoserialno =
MAXX (
FILTER ( Data, Data[serial no] <= _serialno && Data[seq no] <> 0 ),
Data[serial no]
)
RETURN
IF (
Data[seq no] <> 0,
Data[seq no],
MAXX (
FILTER ( Data, Data[serial no] = _lastnonzeroseqnoserialno ),
Data[seq no]
)
+ SUMX (
FILTER (
Data,
Data[serial no] > _lastnonzeroseqnoserialno
&& Data[serial no] <= _serialno
),
Data[quantity]
)
)
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
needed CC =
VAR _serialno = Data[serial no]
VAR _lastnonzeroseqnoserialno =
MAXX (
FILTER ( Data, Data[serial no] <= _serialno && Data[seq no] <> 0 ),
Data[serial no]
)
RETURN
IF (
Data[seq no] <> 0,
Data[seq no],
MAXX (
FILTER ( Data, Data[serial no] = _lastnonzeroseqnoserialno ),
Data[seq no]
)
+ SUMX (
FILTER (
Data,
Data[serial no] > _lastnonzeroseqnoserialno
&& Data[serial no] <= _serialno
),
Data[quantity]
)
)
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
21 | |
12 | |
10 | |
7 |