首页 > 解决方案 > 重采样(Pandas Python)但在 PowerBI 中

问题描述

我正在尝试将 Python 脚本转换为 PowerBI(但是,我不确定它的效率如何)。在 Python 中,代码如下:

sellout_monthly = (sellout_full
                   .groupby(['store_id','ean',pd.Grouper(key='reference_date',freq='M')])
                   .aggregate({'units_sold':'sum','monthly_target':'first','value':'sum'})
                   .reset_index())

pd.Grouper(key='reference_date',freq='M')除了聚合函数中的所有其他分组之外,我不确定如何告诉 PowerBI 进行此分组。其余的可以使用 Transform -> GroupBy ...

标签: powerbi

解决方案


推荐阅读