Forum Discussion
Table with Dynamic Column
I have a table which needs to use a user's selection on a calculated column. The calculated column is used to calculate another columns.
I know is not possible to create columns with measures or dynamic values, so I'm trying to figure out a way to calculate this column with measures.
I already tried using a measure for the calculated column (below) and them using that measure to calculate another columns I need as measures.
"measure Data Considerada ABERTO" = EOMONTH(MAX('Table2'[ReferenceDate]), 0) + 3.
The result for both static and dynamic table (with measures) are show below.
The problem is that that I have some categories, and I need to summarize the table by them as a sum of each column. But instead of counting, it seems to be getting the first value of each category "Centro" (desconsidering the Date Column), as you can see below. What should I do to get the total value?
Hi, Anonymous
Is this the result you expect? There is no direct relationship to the date column.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- Greg_DecklerCommunity Champion
Anonymous First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8 - v-zhangtiCommunity Support
Hi, Anonymous
Based on the data you provided, can you give 2 examples of what your desired output is? Sensitive information can be removed in advance. You can also show it with Excel.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi v-zhangti
Refer to this sample, please.
User input: 30/04/2022
"Data Considerada" = "User input" + 3
"O-Q" = "Data Considerada" - "Data-base fim"Input:
Order ID Category Data-base fim Data Considerada O-Q B Plan Critico B Critico 1 001 04/10/2021 03/05/2022 211 1 0 1 2 001 24/01/2022 03/05/2022 99 1 0 0 3 001 24/01/2022 03/05/2022 99 1 0 0 4 001 14/03/2022 03/05/2022 50 1 0 1 5 001 07/03/2022 03/05/2022 57 1 0 0 6 001 23/11/2021 03/05/2022 161 1 0 0 7 001 20/11/2021 03/05/2022 164 1 1 0 8 002 08/11/2021 03/05/2022 176 1 0 0 9 002 06/12/2021 03/05/2022 148 1 0 0 10 002 06/12/2021 03/05/2022 148 1 0 0 11 002 13/12/2021 03/05/2022 141 1 1 0 12 002 15/11/2021 03/05/2022 169 1 1 0 Total 12 3 2 Output
Category Sum of B Plan Sum of Critico Sum of B Critico 001 7 1 2 002 5 2 0 Total 12 3 2 It doesn't need necessarily to show total on the table.
What I do need is a total to show in a card visual. But if a insert "B Plan" in a card, for example, it doens't show the total = 12.
I also need these results to sum to another measures from another table.
- v-zhangtiCommunity Support
Hi, Anonymous
Is this the result you expect? There is no direct relationship to the date column.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.