powerbi - 重采样(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 ...
解决方案
推荐阅读
- python - 是否可以使用 googletrans 仅翻译标记区域之间的内容?
- json - Postgresql jsonb WHERE 子句
- python - 从 JSON 文件中删除记录
- flutter - 当我在颤振中使用 getX 时,小部件不会改变
- c++ - 错误 LNK1104:无法打开文件 'aocl_utils.lib'
- python - 如何拆分一串名称和相邻的数字,以便将数字分配给每个相邻的字符串名称?
- angular - 如何等到调用服务构造函数并以角度完成执行
- c++ - 将 PDB(蛋白质数据库)文件直接导入虚幻引擎 4
- excel - 单击操作行后,单元格中的新格式会发生变化
- elasticsearch - 在 Elasticsearch/Lucene 中执行模糊查询时,是否最多创建 n^2 个字符串扩展?