Forum Discussion
PiccinelliSte
6 years agoRegular Visitor
Dynamic filtering+calculation
Hello, I am trying to migrate some functionalities from a Python code to PowerBI. So far the idea was to keep data cleaning in Python and migrate the visualisation and allow dynamic filtering and da...
- 6 years ago
That helped a lot. I was able to replicate your scenario. I named the table with the projects just `Projects`.
This is the measure that does what you need:
Value% = DIVIDE( SUM(Projects[Value]), SUMX( ALLSELECTED(Projects), Projects[Value]) )Please let me know and mark as solution if I was able to help you.
jeroenterheerdt
6 years agoMicrosoft Employee
That helped a lot. I was able to replicate your scenario. I named the table with the projects just `Projects`.
This is the measure that does what you need:
Value% =
DIVIDE(
SUM(Projects[Value]),
SUMX(
ALLSELECTED(Projects),
Projects[Value])
)Please let me know and mark as solution if I was able to help you.
PiccinelliSte
6 years agoRegular Visitor
It solves 90% of what I wanted to do. The challenge is that in the visualisation it does not filter only for the Month (through the slicer) but also if I, e.g., choose to visualise the top 10 projects. If I do this the visualised % on the Treemap re-calculate on Top-10-project total.
I think however it is a good starting point...also, if I have a Table nearby the % are correct.
Thanks a lot