Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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 5 categories (clients may overlap in tables). Each one of the five tables connects to the main table via the client name. I have created 6 table visuals to present the information and I have created a few measures that should be calculated in all tables but the columns used should be changed based on the visual we are in. For this I have created another table with only five rows which I use as a filter on this visual (selecting each time the table name) to indicate in a switch expression which column to select. So all of my measure look like this
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.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |