Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello I made a power bi project but during this project I used 2 python scripts; the problem is that I discovered after that standard gateway does not support python so I have to change these 2 scripts or convert them i really need your support
first script Python :
# 'dataset' holds the input data for this script
import pandas as pd
DX= pd.DataFrame(dataset.loc[:,])
AAA = []
for i in range(0, len(DX)):
if(DX['stock initial'][i] > 0):
var = DX['CONSO'][i]
AAA.append(var)
else:
var = var + DX['CONSO'][i]
AAA.append(var)
DX['cumul Consommation']=AAA
result :
second script python
# 'dataset' holds the input data for this script
import pandas as pd
DX= pd.DataFrame(dataset.loc[:,])
AAA = []
for i in range(0, len(DX)):
if(DX['stock initial'][i] > 0):
var = DX['stock initial'][i] + DX['Livr_prevue'][i]-DX['CONSO'][i]
AAA.append(var)
else:
var = var + DX['Livr_prevue'][i]-DX['CONSO'][i]
AAA.append(var)
DX['stock Final']=AAA
result :
thnks for ur support
You can replace these scripts with List.Accumulate() .
Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. Please show the expected outcome.
User | Count |
---|---|
5 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
8 | |
6 | |
4 | |
4 | |
4 |