Forum Discussion
Matrix Totals error
- Anonymous5 years ago
Hi rmocca
Use a summarize table is a good way to solve this problem.
Your new measure:
CPK1 = if(hasonevalue(TAGVALUE[DateValue]),[CPKCategory1],sumx(TAGVALUE,values(TAGVALUE[DateValue])))In addition to jaideepnema , it seems that values function will return to distinct values in your Datevalue column.
They may be Date Type or Text, so your meausres will return to an error.
Build a new measure based on Measure CPKCategory.
New Measure is like:
IF(HASONEVALUE(Table[Month]),[CPKCategory],Sumx(Table,[CPKCategory]))By HASONEVALUE, Table[Month] should be the column in your matrix column field. If you use date hierachy, you can add an calcualted column by Month function. Then use these month in matrix column field. So all month will return to the result of [CPKCategory1], and Matrix Total is not in Month so it return to the false result. Due to I don't know your data model, you may update Sumx(Table,[CPKCategory]) in your measure. It should be a measure to calculate the total for all month directly. In your sample it should be 6+5+3+8 = 22.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi rmocca
Could you tell me if your problem has been solved? If it is, kindly Accept the helpful reply as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou