Forum Discussion
Help combining multiple switch measures (Fully dynamic visual)
I have a series of measures that are controlled by several switch tables and slicers that feed into each other to create a dynamic one visual report that allows the selection of any dimension in cumulative or total count/cost displayed by month, quarter, week, or year, but I need help simplifying/restructuring into a single measure. I tried combining the measures into one and using VAR for the inputs, but I can't wrap my head around how to feed from one measure to the next in a combined fashion.
----Basic Measures----
-----Switching between Count and Cost-----
Count/Cost =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Switch Table Basic'[Label] ) = "Count", CALCULATE ( [Project Count] ),
SELECTEDVALUE ( 'Switch Table Basic'[Label] ) = "Cost", CALCULATE ( [Intake Cost] ),
CALCULATE ( [Project Count] )
)
--Switch Table Basic--
-----Cumulative Totals of Basic Measures Selected in the previous measure-----
--DIM Funding Model-- (As example, there are several tables set up like this that are reference in the measure above)
--Date Slicer(Contains --
----Data Model----
2 Replies
- v-zhangtiCommunity Support
Hi, Buttersworth
Based on the data you provided, can you give one or two examples of what your expected output looks like?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- ButtersworthNew Member
Hi v-zhangti ,
Thanks for responding!
The measures work fine in visuals already. The "Date and DIM Slicer Current/Cumulative Switch Count/Cost" and "Period" from "Date Slicer" allow the user to fully control the visual with the filters below:The main chart below, is fully controlled:
I really just need help with combining all of these measures into one to simplify and optimize the report. The only issue I have that I am trying to work out seperately, is displaying dates with no data within the selected range. I have been toying with the basic measures (Project Count and Project Cost) to fix this issue, but I think the issue may be coming from another measure higher up in the chain. Either way, getting the measures into one is the main goal and I think that would help me fix the secondary issue of displaying dates with no data.
Thank you so much!