Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

How do I replicate this value in a card visual

I have got the measure seen below in a line visual with date hierarchy along the x-axis, then the measure is used in the tooltip and gives the correct value for % diff from last year. 

I am looking to recreate this in order to get the MAX months value comparison to the same period last year and then be able to put that in a card visual. 

 

I've tried this in a few different ways but can't get the value correct. 

Any help with this would be greatly appreciated! 

 

Measure : 

% Difference From Last Year =
( [Sum of Usage] / [SamePeriodLastYear] - 1 )
 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You can use CONCATENATEX dax to combine all the measures within a measure and then utilize the card visual.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Please try the following methods and check if they can solve your problem:

    1.Create the measure to calculate.

    % Difference From Last Year =
    DIVIDE(
        [Sum of Usage],
        CALCULATE([Sum of Usage], SAMEPERIODLASTYEAR('Date'[Date])),
        0
    ) - 1

     

    2.Create the new measure to get MAX value.

    Max = MAXX(ALL('Date'[Month]),[% Difference From Last Year])

     

    Best Regards,

    Wisdom Wu

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