Forum Discussion

7 Replies

  • Hi,

    Sorry but not clear with your requirement,  Please share some data and show the expected result.

  • v-aatheeque's avatar
    v-aatheeque
    Icon for Community Support rankCommunity Support

    Hi Gayathri_Mani96​ 

    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_Mani96's avatar
      Gayathri_Mani96
      New 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's avatar
        danextian
        Icon for Super User rankSuper 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's avatar
    ShahRukhSameer
    Icon for Continued Contributor rankContinued 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's avatar
      v-aatheeque
      Icon for Community Support rankCommunity Support

      Hi Gayathri_Mani96​ 

      Following up to confirm if the earlier responses addressed your query. If not, please share your questions and we’ll assist further.