Forum Discussion
Field Parameter with dynamic measures to matrix
I am currently recreating the same report page , and i have created the field parameter, now i want to create the matrix mom and mom% dynamically.
And also reference labels for cards also.
Below is my work
7 Replies
- Ashish_Mathur
Super User
Hi,
Sorry but not clear with your requirement, Please share some data and show the expected result.
- v-aatheeque
Community Support
Following up to confirm if the earlier responses addressed your query. If not, please share your questions with a sample data and we’ll assist further.
- Gayathri_Mani96New Member
Hi v-aatheeque ,
I am using the field parameter slicers, to change the Total_Units, Total_Sales,Total_Discounts, Total_COGS dynamically.
My doubt is i have to create the dynamic month on month sales/units/discounts/cogs in table/ matrix visualization. (i used sales data randomly)
The above is my reference page.
- danextian
Super User
You can use a calculation group to apply time intelligence or any other calculations. The logic will be applied to whatever measure is added to the visual by default.
- ShahRukhSameer
Continued Contributor
Hi Gayathri_Mani96,
Field Parameters work well for switching the main measure (Sales, Units, Profit, etc.), but the challenge is that your MoM and MoM% measures also need to react to the selected parameter.
One approach is to use a single dynamic measure driven by SELECTEDVALUE() on the field parameter table, then return the corresponding base measure, MoM measure, and MoM% measure with a SWITCH() statement. Use these dynamic measures in the matrix instead of hardcoded measures.
Example:
Dynamic MoM =
SWITCH(
SELECTEDVALUE('Metric Parameter'[Metric]),
"Sales", [Sales MoM],
"Units", [Units MoM],
"Profit", [Profit MoM]
)
Dynamic MoM % =
SWITCH(
SELECTEDVALUE('Metric Parameter'[Metric]),
"Sales", [Sales MoM %],
"Units", [Units MoM %],
"Profit", [Profit MoM %]
)
For the cards, create a dynamic label measure so the title changes based on the selected metric:
Card Title =
SELECTEDVALUE('Metric Parameter'[Metric]) & " YTD"
If you want more flexibility in the matrix, you can also use a disconnected metrics table and a Matrix with rows such as Actual, MoM, and MoM%, then drive all values from a single dynamic measure. That tends to scale better when the number of metrics grows.
- v-aatheeque
Community Support
Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.