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.
Solved! Go to Solution.
Hi @RodolfoGuti ,
Or like this?
Dias_Stock_Enero =
VAR __i = 31
VAR __loopTable = GENERATESERIES(1,__i)
VAR __loopTable1 = ADDCOLUMNS(__loopTable,"__i",Date(2020,1,[Value]))
VAR __loopTable2 = ADDCOLUMNS(__loopTable1,"sum",SUMX(FILTER(Query1,[DocDate]<=[__i]),[cantidad]))
VAR __loopTable3 = ADDCOLUMNS(__loopTable2,"cant",COUNTX( FILTER(__loopTable2,[sum]>0), [sum]) )
RETURN
SUMX(__loopTable3,[cant])
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RodolfoGuti ,
Or like this?
Dias_Stock_Enero =
VAR __i = 31
VAR __loopTable = GENERATESERIES(1,__i)
VAR __loopTable1 = ADDCOLUMNS(__loopTable,"__i",Date(2020,1,[Value]))
VAR __loopTable2 = ADDCOLUMNS(__loopTable1,"sum",SUMX(FILTER(Query1,[DocDate]<=[__i]),[cantidad]))
VAR __loopTable3 = ADDCOLUMNS(__loopTable2,"cant",COUNTX( FILTER(__loopTable2,[sum]>0), [sum]) )
RETURN
SUMX(__loopTable3,[cant])
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.