Forum Discussion
Adjust the column width dynamically based on the number of columns selected.
- 8 months ago
In the display/disconnected table, you can just add another column whether the row is for actual, budget or difference and use that in a slicer.
Hi Ignite190
What you are trying to accomplish cannot be done using separate visuals. The visuals at the top have no awareness of the width or layout of the columns in the matrix below - they are static and their dimensions cannot be controlled with a measure. In addition, field parameter tables do not support hierarchies. A workable approach is to use a disconnected table that contains the measure names along with their groupings, and then create a measure that references those columns. If different formats are required, additional columns will be needed to store format strings, as well as a separate column to control sort order.
Header Measures 01 =
VAR MeasureName =
SELECTEDVALUE ( MHeaders[Measure Name] )
RETURN
SWITCH (
TRUE (),
MeasureName = "Leads Actual", [Leads_Actual],
MeasureName = "Leads Budget"
&& SELECTEDVALUE ( MHeaders[Budget/Actual] ) = "DIFF", [Leads_Actual] - [Leads_Budget],
MeasureName = "Leads Budget", [Leads_Budget],
MeasureName = "Marketing Spend Actual", [Marketing_Spend_Actual],
MeasureName = "Marketing Budget", [Marketing_Budget],
MeasureName = "Revenue Actual", [Revenue_Actual],
MeasureName = "Revenue Budget", [Revenue_Budget],
MeasureName = "Conversions Actual", [Conversions_Actual],
MeasureName = "Conversions Budget", [Conversions_Budget]
)
Note: Since there is only one measure and the hierarchy are essentially dimensions, sorting by a measure is not possible by clicking a header.
Please see the attached sample pbix.
Hi danextian - Thanks for replying . I reviewed your dashboard but there is one thing missing from my requirement . User should be able to select if they want to see only Actuals/budget or Difference . Can you update your file and share with this functionality.
- danextian8 months ago
Super User
In the display/disconnected table, you can just add another column whether the row is for actual, budget or difference and use that in a slicer.
- Ignite1906 months agoFrequent Visitor
Hi Danextial , Thanks for your response . The problem with this solution is that I am unable to sort the columns which is also essential part of requirement . Could you provide a solution where I can also sort the column . Thanks alot for your help.