0

Dynamic Caption For Measure

Was wondering if there is any way for the caption for the measure to change depending on the column. For example, with how the sample discover is looking, we want the caption if it is under "Imcumbents" to be called "Imcumbents Sales" and then for the New Comers" it be called "New Comers Sales"
 

3 replies

null
    • Redeemed from the Dark Side (Power BI)
    • Obee1
    • 2 days ago
    • Reported - view

    Look at Dynamic Captions - perhaps this is what you're after.

    • Customer Solutions Architect
    • Moshe_Yossef
    • 6 hrs ago
    • Reported - view

    Hi  
    Not really, the dynamic caption is evaluated before the query is ran - so it this won't work.
    What you can try is creating 2 measures: Incumbents Sales will  be:

    if(
    [Manufacturers].[Manufacturer Grouping].currentmember is [Manufacturers].[Manufacturer Grouping].[Incumbents],
     [measures].[SalesData Sales]
    ,NULL)
    

    and the second can be "New Comers Sales":

    if(
        [Manufacturers].[Manufacturer Grouping].currentmember is [Manufacturers].[Manufacturer Grouping].[New Comers],
         [measures].[SalesData Sales],
        NULL
    )
    

     

    This way one of them will be NULL and therefore hidden for each manufacturer grouping:

    See attached PIE file as well.
    I hope this helps 

    Incumbents and New Comer Sales.pie 

      • Cindy_Tran
      • 1 hr ago
      • Reported - view

       I dont think this really solves my problem for the data I'm using. (Was just using the training model to give an example). When I did what you did on my model, its creating two columns under each category. So like under incumbents->online there are two columns incumbent sales and then there is also a column new comers sales next to it but the new comers sales column is empty. 

      I just want the caption to change without adding any more additional columns. 

Content aside

  • 1 hr agoLast active
  • 3Replies
  • 19Views
  • 4 Following