Forum Discussion
Generate a loop
- 5 years ago
Hi, XaviOV
According to your follow-up, I can understand your logic now, I think you can achieve this using the calculated table in Power BI, you can try my step:
Go to the table tool, create a new table like this:
List = SELECTCOLUMNS( FILTER(ALL('Table'),[#pallets]<[#huecos]), "LETRA",[LETRA])Then you can get the expected list:
The list will also be updated with the change of the dataset.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
XaviOV ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- XaviOV5 years agoHelper V
- amitchandak5 years agoSuper User
XaviOV , Still not clear. You create first column using generateseries , rest need to come from that
generateseries(1,5)
https://docs.microsoft.com/en-us/dax/generateseries-function
- XaviOV5 years agoHelper V
Hi, amitchandak
I want transalate this formula to DAXlist=[]
i=1
while i<5:if #pallets[i]<#huecos[i]:
list=list+LETRA[i]
i=i+1
return list
Regards,
Xavi