Forum Discussion
FotFly
1 year agoHelper II
Selected value from table gets changed on selection
Hi all, In my model I have 6 tables. All contain information about Clients and revenue. There is a main table with all clients and the others contain a subset of the main clients broken down into ...
Kedar_Pande
1 year agoSuper User
When you filter by a client, the measure evaluates only the selected table and returns blank for others, as the filter context from TablePresented[Value] conflicts with the other visuals.
Update your measure as follows:
Revenue =
SWITCH(
TRUE(),
ISFILTERED(MainTable[Client Name]), SUM(MainTable[Revenue]),
ISFILTERED(Product1[Client Name]), SUM(Product1[Revenue]),
ISFILTERED(Product2[Client Name]), SUM(Product2[Revenue]),
ISFILTERED(Product3[Client Name]), SUM(Product3[Revenue]),
ISFILTERED(Product4[Client Name]), SUM(Product4[Revenue]),
ISFILTERED(Product5[Client Name]), SUM(Product5[Revenue]),
BLANK()
)
This approach ensures client selections work correctly for all visuals, avoiding blanks.
Your Kudos/Likes are much appreciated!
If this post helps, please consider Accepting it as the solution to help the other members find it more quickly.
Regards,
Kedar Pande
www.linkedin.com/in/kedar-pande
- FotFly1 year agoHelper II
Thank you for you answer.
With this approach I have the same client filtered in all tables presenting the total revenue value from the main table when it should be calculating the specific product revenue based on the column selected. That means that each time the MainTable[Client] column is filtered and I get wrong results.