Forum Discussion
Daily Values from Running Total
| Key | Date | Cumulative Cases |
| Baldwin, Alabama | 4/10/2022 | 64 |
| Baldwin, Alabama | 4/11/2022 | 70 |
| Baldwin, Alabama | 4/12/2022 | 75 |
| Baldwin, Alabama | 4/13/2022 | 82 |
| Autaga, Alabama | 4/10/2022 | 18 |
| Autaga, Alabama | 4/11/2022 | 19 |
| Autaga, Alabama | 4/12/2022 | 19 |
| Autaga, Alabama | 4/13/2022 | 20 |
| Tyler, Texas | 4/10/2022 | 87 |
| Tyler, Texas | 4/11/2022 | 89 |
| Tyler, Texas | 4/12/2022 | 95 |
| Tyler, Texas | 4/13/2022 | 102 |
Hello VahidDM,
I have updated the question.
I come up with solution but it is only working on the sample dataset. When I use the same DAX formula on the actual dataset, PowerBI is stuck on working on it.
What will suggest on optimizing the DAX formula?
Thank you!
- aj19733 years agoCommunity Champion
Why not using it as a Measure instead of a calculated column. The DAX will work just fine into a measure.
- blackgold3 years agoRegular Visitor
I tired that and I get an error saying:
A single value for column 'Key' in table 'Table' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
- aj19733 years agoCommunity Champion
Did you modify the measure in the picture above to get it work as a Measure? Like in the Return, did you add Sum(Table...)
Try to evaluate your VAR one by one until you get to know which one needs a little modification..... remember to keep the logic of your calculated column.