Forum Discussion

markzuev6's avatar
markzuev6
Regular Visitor
1 year ago
Solved

Data labels creation issue

Hello,   I was trying to create data labels showing %, while the chart should show absolute numbers.   My current formula works well if I switch the X and Y axis dimensions, but the calculation g...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, markzuev6 

    Based on your description, I created the following dataset:

    The relationship between them is as follows:

    Based on the expression you provided, you want to find the current [Dynamic GRP] as a percentage of the current year (clearing 'Dynamic variables (TopN)' [Player type] and Data [Channel group]). 

    Create a measure using the following DAX expression:

    Measure = ROUND(
        DIVIDE(
            [Dynamic GRP],
            CALCULATE(
                [Dynamic GRP],
                ALLSELECTED('Dynamic variables (TopN)'[Player Type]),
                ALLSELECTED(Data[Channel Group]),
                VALUES(Data[Year])
            )
        )*100 , 0
    )/100

    The visual settings are as follows:

    If you still have any doubts, you can clarify and clearly describe your expected results in the follow-up along with examples.

     

     

     

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.