英文:
Power BI matrix doesn't show Total or Grand Total for certain rows
问题
我最近在创建一个DAX查询方面得到了帮助,该查询可以帮助我计算两行之间的差值。
尽管最后一行的总计是正确的,但前两行缺失:
你是否曾经见过这样的情况?
编辑:嗨,大卫,看起来你和我是池塘里唯一的两条鱼:
奇怪的是,我无法将矩阵的列恢复为我的截图中的样子。
想法是每列一个月,最后是总计。
另外,是否可以在十二月和一月之间去掉"Total"?
英文:
I have lately received help in creating a DAX query that could help me calculate the delta between two lines.
While the Totals for the last line are OK for the first two lines are missing:
Have you ever seem something like this?
EDIT: Hi David, seems like you and I we are the only fish in the pond:
Strangely I cannot put the columns of the Matrix back as they were in my screenshot.
The idea is to have one month per column and the total at the end.
Also, Is it possible to remove the "Total" between December and January?
答案1
得分: 1
我在你的.pbix文件中没有看到截图中显示的内容,所以不确定问题所在。要按照你的要求配置小计,请执行以下操作:
- 选择列小计,并打开每列级别设置。
- 从下拉菜单中选择"Month",并选择"Show subtotal"为"Off"。
如果你想要这样的结果:
使用以下度量值:
Delta2 =
VAR tbl = FILTER(Data, Data[UsageDate] >= DATE(2022,11,30))
RETURN
IF(NOT(ISBLANK(SUM(Data[Cost]))) , CALCULATE( SUMX( VALUES( Data[UsageDate]),[Fixed Amount] - CALCULATE(SUM(Data[Cost])) ), tbl))
英文:
I'm not seeing in your .pbix what you show in the screenshot so not sure of the problem. To configure the totals as you wish, do the following:
Select column subtotals, and turn on per column level settings. Select Month from drop down and select off for Show subtotal.
EDIT|
If you want this:
Use this measure.
Delta2 =
VAR tbl = FILTER(Data, Data[UsageDate] >= DATE(2022,11,30))
RETURN
IF(NOT(ISBLANK(SUM(Data[Cost]))) , CALCULATE( SUMX( VALUES( Data[UsageDate]),[Fixed Amount] - CALCULATE(SUM(Data[Cost])) ), tbl))
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论