Forum Discussion
Link table data with measures data and display in a visual
- Anonymous1 year ago
Hi Gruja
ComparisonTable is a calculated table. A calculated table cannot be filtered by filters or slicers in the report. You can consider its data is static when you interact with the report.
To have a dynamic result displayed, you need to use a measure to populate the column visual.
A common practice is to add an additional table which has category values to be displayed on x-axis. For example, table 'DimCategory':
Create measures to calculate the Forecasted value and Actual value separately. For example,
Forecasted = SWITCH( SELECTEDVALUE('DimCategory'[Category]), "Office Space", [Bürobedarf], "Storage Space", [Lagerbedarf], "Laboratory Space", [Gesamt Laborbedarf] )Actual = SWITCH( SELECTEDVALUE('DimCategory'[Category]), "Office Space", SUMX(FILTER('Export RDB', 'Export RDB'[DIN277-1] = "NUF2"), 'Export RDB'[Raum - Fläche in m²]), "Storage Space", SUMX(FILTER('Export RDB', 'Export RDB'[DIN277-1] = "NUF4"),'Export RDB'[Raum - Fläche in m²]), "Laboratory Space", SUMX(FILTER('Export RDB', 'Export RDB'[DIN277-1]= "NUF3"), 'Export RDB'[Raum - Fläche in m²]) )Place the new 'DimCategory' table's [Category] column to X-axis, and place the two new measures to Y-axis.
Hope this would be helpful.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi Gruja ,
You cannot use measures in Tables, measure are calculated at the time of the visualzaion call and are based on context so they are calculated at need.
When you add a measure to a physical table the context is not consider properly sinvce you change your filter context so they are not properly calculated.
Please check this link with explanation about measures and columns
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/