Forum Discussion
Help with accumulated values
- 2 years ago
I got it. the issue was that I wal filtering on the "franqueados" table, while I should be filtering on the "calendar" table.. Here is the measure that generates the expected running total:
=CALCULATE( COUNTROWS(franqueados); franqueados[Papel na rede] = "Franquia"; FILTER( ALLSELECTED('Calendar'[Date]); ISONORAFTER('Calendar'[Date]; MAX('Calendar'[Date]); DESC ) ) )Thank you very much Anonymous and NickDanger for participating on this thread and helping figuring it out!
Best regards,
Victor Hugo.
If you want to use the new Power BI Preview Feature of Visual Calculations, it may be very simple.
First make sure the feature is turned on in your settings:
Make a calculated column in your fact that is simply a value of "1" if the "Papel na rede" = "Franquia".
Add a "New Calculation"
Add the new column in your visual as a value
Choose the "Running Sum" calculation from the fx button and put the "Sum" of your column as the field"
Lastly, "Hide" the Sum of your measure in the fields pane
Let me know if this does the calculation as you expected!
Thanks
Nick
- vgarciasouza2 years agoFrequent Visitor
Hello NickDanger , thank you for the effort!
I needed it as a measure, because I'll use it in calculations further down the road. Also, I needed it to be accumulating int time, therefore the total in 2024 should be 884.